Skip to content

Commit fa572e5

Browse files
committed
refactor(cdk-experimental/accordion): add tabindex -1 to visually hidden span
Updates previous fix to add tabindex -1 to make the visually hidden span not focusable.
1 parent 21ceb3c commit fa572e5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/cdk-experimental/accordion/accordion.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ export class CdkAccordionTrigger {
156156
const visuallyHiddenSpan = this._renderer.createElement('span');
157157
this._renderer.addClass(visuallyHiddenSpan, 'cdk-visually-hidden');
158158
this._renderer.setAttribute(visuallyHiddenSpan, 'id', this.pattern.visuallyHiddenId());
159+
this._renderer.setAttribute(visuallyHiddenSpan, 'tabindex', '-1');
159160

160161
// Get the button's text content and set it on the span
161162
let buttonText = '';

0 commit comments

Comments
 (0)