Repository navigation
Closed
Labels
a11yAccessibility issueAccessibility issuerequires new majorThis would be a breaking changeThis would be a breaking changev24To be done in V24To be done in V24vaadin-details
Description
Describe your motivation
Currently, vaadin-details is the only remaining Vaadin component that has focusable element in Shadow DOM:
web-components/packages/details/src/vaadin-details.js
Lines 82 to 93 in d6f871f
| <div | |
| role="button" | |
| part="summary" | |
| on-click="_onToggleClick" | |
| on-keydown="_onToggleKeyDown" | |
| disabled$="[[disabled]]" | |
| aria-expanded$="[[_getAriaExpanded(opened)]]" | |
| aria-controls$="[[_contentId]]" | |
| > | |
| <span part="toggle" aria-hidden="true"></span> | |
| <span part="summary-content"><slot name="summary"></slot></span> | |
| </div> |
This has some implications related to focus management and screen reader announcements:
- The
vaadin-tooltipoverlay is not correctly announced because of Shadow DOM boundary, - The expanded / collapsed state seems to be incorrectly announced by NVDA, see #152,
- We have to use a
ShadowFocusMixin(only used by this component) to make focus work.
Describe the solution you'd like
Make breaking changes in the DOM structure of vaadin-details and vaadin-accordion-panel:
- By default, place the summary component in light DOM, like we do for e.g.
vaadin-checkboxlabel, - Convert the default summary component to
vaadin-details-togglewith aniconstylable part, - Add
summaryproperty to make it possible to createvaadin-detailswithout usingsummaryslot, - Set
idon the element passed to default slot (if not set by the user) for linking byaria-controls.
Additional context
We might want to also remove an element with heading role from vaadin-details Shadow DOM, but keep using it in case of vaadin-accordion-panel. See Why <details> is Not an Accordion for more context and related a11y implications.
Metadata
Metadata
Assignees
Labels
a11yAccessibility issueAccessibility issuerequires new majorThis would be a breaking changeThis would be a breaking changev24To be done in V24To be done in V24vaadin-details
Activity