Skip to content

Commit ece1063

Browse files
fix(core): add title/aria-label to shellbar nav and back buttons
1 parent 4ab0854 commit ece1063

20 files changed

+40
-4
lines changed

libs/core/shellbar/shellbar.component.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
fdType="transparent"
1919
glyph="menu2"
2020
(fdkClicked)="_navigationClicked($event)"
21+
[attr.title]="navigationButtonLabel || ('coreShellbar.navigationButtonLabel' | fdTranslate)"
22+
[attr.aria-label]="navigationButtonLabel || ('coreShellbar.navigationButtonLabel' | fdTranslate)"
2123
></button>
2224
}
2325
@if (showBackButton && !_showMobileSearch) {
@@ -27,6 +29,8 @@
2729
fdType="transparent"
2830
[glyph]="_rtl$() ? 'slim-arrow-right' : 'nav-back'"
2931
(fdkClicked)="_backClicked($event)"
32+
[attr.title]="backButtonLabel || ('coreShellbar.backButtonLabel' | fdTranslate)"
33+
[attr.aria-label]="backButtonLabel || ('coreShellbar.backButtonLabel' | fdTranslate)"
3034
></button>
3135
}
3236
<ng-content select="fd-shellbar-branding"></ng-content>

libs/core/shellbar/shellbar.component.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,14 @@ export class ShellbarComponent implements AfterContentInit, AfterViewInit, OnDes
112112
@Input()
113113
showBackButton = false;
114114

115+
/** Label for the navigation button. */
116+
@Input()
117+
navigationButtonLabel: string;
118+
119+
/** Label for the back button. */
120+
@Input()
121+
backButtonLabel: string;
122+
115123
/** Emitted event when navigation button is clicked. */
116124
@Output()
117125
navigationButtonClicked: EventEmitter<Event> = new EventEmitter<Event>();

libs/i18n/src/lib/models/fd-language-key-identifier.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ export type FdLanguageKeyIdentifier =
8282
| 'coreShellbar.cancel'
8383
| 'coreShellbar.search'
8484
| 'coreShellbar.assistiveTools'
85+
| 'coreShellbar.backButtonLabel'
86+
| 'coreShellbar.navigationButtonLabel'
8587
| 'coreSlider.singleMinMaxDetails'
8688
| 'coreSlider.singleValueminDetails'
8789
| 'coreSlider.singleValuemaxDetails'

libs/i18n/src/lib/translations/translations.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ coreShellbar.cancel = Cancel
156156
coreShellbar.search = Search
157157
#XFLD: Label for the assistive tools button in the shellbar
158158
coreShellbar.assistiveTools = Assistive Tools
159+
#XFLD: Label for the back button in the shellbar
160+
coreShellbar.backButtonLabel = Back
161+
#XFLD: Label for the navigation button in the shellbar
162+
coreShellbar.navigationButtonLabel = Navigation
159163
#XACT: Screen reader text explaining the minimum and maximum values of the slider component
160164
coreSlider.singleMinMaxDetails = Slider minimum value is {min}, maximum value is {max}
161165
#XACT: Screen reader text denoting the minimum value of the slider

libs/i18n/src/lib/translations/translations.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable */
12
// Do not modify, it's automatically created. Modify translations.properties instead
23
export default {
34
coreCalendar: {
@@ -110,7 +111,9 @@ export default {
110111
collapsedItemMenuLabel: 'Collapsed Item Menu',
111112
cancel: 'Cancel',
112113
search: 'Search',
113-
assistiveTools: 'Assistive Tools'
114+
assistiveTools: 'Assistive Tools',
115+
backButtonLabel: 'Back',
116+
navigationButtonLabel: 'Navigation'
114117
},
115118
coreSlider: {
116119
singleMinMaxDetails: 'Slider minimum value is {min}, maximum value is {max}',
@@ -198,7 +201,7 @@ export default {
198201
ariaLabel: 'Wizard'
199202
},
200203
coreBreadcrumb: {
201-
overflowTitleMore: 'More',
204+
overflowTitleMore: 'Click or press enter to view more details',
202205
breadcrumbTrailLabel: 'Breadcrumb Trail'
203206
},
204207
platformApprovalFlow: {

libs/i18n/src/lib/translations/translations_ar.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable */
12
// Do not modify, it's automatically created. Modify translations_ar.properties instead
23
export default {
34
coreCalendar: {

libs/i18n/src/lib/translations/translations_cs.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable */
12
// Do not modify, it's automatically created. Modify translations_cs.properties instead
23
export default {
34
coreCalendar: {

libs/i18n/src/lib/translations/translations_en_US_sappsd.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ export default {
111111
coreShellbar: {
112112
collapsedItemMenuLabel: '[[[Ĉŏĺĺąρşēƌ Ĭţēɱ Μēŋű∙∙∙∙∙]]]',
113113
cancel: '[[[Ĉąŋċēĺ∙∙∙∙∙∙∙∙]]]',
114-
search: '[[[Ŝēąŗċĥ∙∙∙∙∙∙∙∙]]]'
114+
search: '[[[Ŝēąŗċĥ∙∙∙∙∙∙∙∙]]]',
115+
assistiveTools: '[[[Āşşįşţįʋē Ţŏŏĺş∙∙∙∙]]]'
115116
},
116117
coreSlider: {
117118
singleMinMaxDetails: '[[[Ŝĺįƌēŗ ɱįŋįɱűɱ ʋąĺűē įş {ɱįŋ}, ɱąχįɱűɱ ʋąĺűē įş {ɱąχ}∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙]]]',
@@ -201,7 +202,7 @@ export default {
201202
ariaLabel: '[[[Ŵįžąŗƌ∙∙∙∙∙∙∙∙]]]'
202203
},
203204
coreBreadcrumb: {
204-
overflowTitleMore: '[[[Μŏŗē]]]',
205+
overflowTitleMore: '[[[Ĉĺįċķ ŏŗ ρŗēşş ēŋţēŗ ţŏ ʋįēŵ ɱŏŗē ƌēţąįĺş∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙]]]',
205206
breadcrumbTrailLabel: '[[[Ɓŗēąƌċŗűɱƃ Ţŗąįĺ∙∙∙∙∙∙∙∙]]]'
206207
},
207208
platformApprovalFlow: {

libs/i18n/src/lib/translations/translations_he.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable */
12
// Do not modify, it's automatically created. Modify translations_he.properties instead
23
export default {
34
coreCalendar: {

libs/i18n/src/lib/translations/translations_hu.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable */
12
// Do not modify, it's automatically created. Modify translations_hu.properties instead
23
export default {
34
coreCalendar: {

0 commit comments

Comments
 (0)