Skip to content

Commit fe56110

Browse files
authored
fix(angular/sidebar): removes -1 tabindex from sidenav in "over" mode (#2531)
Updates the sidebar component so that when the mode is not equal to `side` the tabIndex value is -1. Otherwise, provide a null value.
1 parent a807112 commit fe56110

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

src/angular/i18n/xlf/messages.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,15 @@
182182
<source>Close Sidebar</source>
183183
<context-group purpose="location">
184184
<context context-type="sourcefile">../../sidebar/sidebar/sidebar.ts</context>
185-
<context context-type="linenumber">114</context>
185+
<context context-type="linenumber">117</context>
186186
</context-group>
187187
<note priority="1" from="description">Button label to close the sidebar</note>
188188
</trans-unit>
189189
<trans-unit id="sbbSidebarOpenSidebar" datatype="html">
190190
<source>Open Sidebar</source>
191191
<context-group purpose="location">
192192
<context context-type="sourcefile">../../sidebar/sidebar/sidebar.ts</context>
193-
<context context-type="linenumber">555</context>
193+
<context context-type="linenumber">558</context>
194194
</context-group>
195195
<note priority="1" from="description">Button label to open the sidebar</note>
196196
</trans-unit>

src/angular/i18n/xlf2/messages.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@
194194
</unit>
195195
<unit id="sbbSidebarCloseSidebar">
196196
<notes>
197-
<note category="location">../../sidebar/sidebar/sidebar.ts:114</note>
197+
<note category="location">../../sidebar/sidebar/sidebar.ts:117</note>
198198
<note category="description">Button label to close the sidebar</note>
199199
</notes>
200200
<segment>
@@ -203,7 +203,7 @@
203203
</unit>
204204
<unit id="sbbSidebarOpenSidebar">
205205
<notes>
206-
<note category="location">../../sidebar/sidebar/sidebar.ts:555</note>
206+
<note category="location">../../sidebar/sidebar/sidebar.ts:558</note>
207207
<note category="description">Button label to open the sidebar</note>
208208
</notes>
209209
<segment>

src/angular/sidebar/sidebar/sidebar.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ export class SbbSidebarContent extends SbbSidebarContentBase implements AfterCon
9898
'[class.sbb-sidebar-opened]': 'opened',
9999
'[class.sbb-sidebar-collapsible]': 'collapsible',
100100
'[style.visibility]': '(!_container && !opened) ? "hidden" : null',
101+
// The sidebar container should not be focused on when used in side mode.
102+
// Updates tabIndex to default to null if in side mode.
103+
'[attr.tabIndex]': '(mode !== "side") ? "-1" : null',
101104
},
102105
changeDetection: ChangeDetectionStrategy.OnPush,
103106
encapsulation: ViewEncapsulation.None,

0 commit comments

Comments
 (0)