fix(cdk-experimental/accordion): fix disabled trigger button can't be focused when skipDisabled=false#31379
Conversation
|
Deployed dev-app for c8b2e73 to: https://ng-dev-previews-comp--pr-angular-components-31379-dev-wcgip6j4.web.app Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt. |
src/components-examples/cdk-experimental/accordion/cdk-accordion/cdk-accordion-example.html
Outdated
Show resolved
Hide resolved
wagnermaciel
left a comment
There was a problem hiding this comment.
LGTM once mmalerba's comment is addressed
Side-note:
I noticed that event listeners are being attached per-accordion trigger instead of once on the accordion group. This is bad for initial load performance but isn't a major issue for this particular component since it is rare to have many accordions a page. It might be worth asking Jules to try refactoring this as a future PR.
abb4fc4 to
f83f0ab
Compare
… focused when skipDisabled=false
f83f0ab to
c8b2e73
Compare
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
In short, in the demo page
Makes the button natively disabled and not focusable, so even with
skipDisabled=falseit can't be focused by the focus manager.Change it to
Makes the
cdkAccordionTriggerto be disabled without changing the button state.Also added the
inertattribute to the button when it's completely disabled(disabled and skip disabled), so it can't be focused by a pointer.