Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added titles a11y in buttons of uc-activity-header #748

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions blocks/CameraSource/CameraSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export class CameraSource extends UploaderBlock {

CameraSource.template = /* HTML */ `
<uc-activity-header>
<button type="button" class="uc-mini-btn" set="onclick: *historyBack">
<button type="button" class="uc-mini-btn" set="onclick: *historyBack" l10n="@title:back">
<uc-icon name="back"></uc-icon>
</button>
<div set="@hidden: !cameraSelectHidden">
Expand All @@ -227,7 +227,12 @@ CameraSource.template = /* HTML */ `
set="$.options: cameraSelectOptions; @hidden: cameraSelectHidden; onchange: onCameraSelectChange"
>
</uc-select>
<button type="button" class="uc-mini-btn uc-close-btn" set="onclick: *closeModal">
<button
type="button"
class="uc-mini-btn uc-close-btn"
set="onclick: *closeModal"
l10n="@title:a11y-activity-header-button-close"
>
<uc-icon name="close"></uc-icon>
</button>
</uc-activity-header>
Expand Down
9 changes: 7 additions & 2 deletions blocks/ExternalSource/ExternalSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
this.mountIframe();
},
});
this.sub('*currentActivityParams', (val) => {

Check warning on line 99 in blocks/ExternalSource/ExternalSource.js

View workflow job for this annotation

GitHub Actions / build

'val' is defined but never used
if (!this.isActivityActive) {
return;
}
Expand Down Expand Up @@ -249,14 +249,19 @@

ExternalSource.template = /* HTML */ `
<uc-activity-header>
<button type="button" class="uc-mini-btn" set="onclick: *historyBack">
<button type="button" class="uc-mini-btn" set="onclick: *historyBack" l10n="@title:back">
egordidenko marked this conversation as resolved.
Show resolved Hide resolved
<uc-icon name="back"></uc-icon>
</button>
<div>
<uc-icon set="@name: activityIcon"></uc-icon>
<span>{{activityCaption}}</span>
</div>
<button type="button" class="uc-mini-btn uc-close-btn" set="onclick: *historyBack">
<button
type="button"
class="uc-mini-btn uc-close-btn"
set="onclick: *historyBack"
l10n="@title:a11y-activity-header-button-close"
egordidenko marked this conversation as resolved.
Show resolved Hide resolved
>
<uc-icon name="close"></uc-icon>
</button>
</uc-activity-header>
Expand Down
3 changes: 0 additions & 3 deletions blocks/Icon/Icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export class Icon extends Block {
...this.init$,
name: '',
href: '',
title: '',
};
}

Expand All @@ -33,12 +32,10 @@ export class Icon extends Block {

Icon.template = /* HTML */ `
<svg ref="svg" xmlns="http://www.w3.org/2000/svg">
<title>{{title}}</title>
<use set="@href: href;"></use>
</svg>
`;

Icon.bindAttributes({
name: 'name',
title: 'title',
});
9 changes: 7 additions & 2 deletions blocks/UrlSource/UrlSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,19 @@ export class UrlSource extends UploaderBlock {

UrlSource.template = /* HTML */ `
<uc-activity-header>
<button type="button" class="uc-mini-btn" set="onclick: *historyBack">
<button type="button" class="uc-mini-btn" set="onclick: *historyBack" l10n="@title:back">
<uc-icon name="back"></uc-icon>
</button>
<div>
<uc-icon name="url"></uc-icon>
<span l10n="caption-from-url"></span>
</div>
<button type="button" class="uc-mini-btn uc-close-btn" set="onclick: *closeModal">
<button
type="button"
class="uc-mini-btn uc-close-btn"
set="onclick: *closeModal"
l10n="@title:a11y-activity-header-button-close"
>
<uc-icon name="close"></uc-icon>
</button>
</uc-activity-header>
Expand Down
Loading