You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Closesmuxinc/elements#1040
This PR enhances accessibility of the media-chrome components.
## Changes
- Changed `MediaCaptionsButton` from `role="switch"` to `role="button"`
to avoid Firefox's "visible text label" requirement for form elements,
while maintaining toggle semantics via `aria-checked`.
- Added visible (but off-screen) label to `MediaChromeRange` to satisfy
Firefox's requirement for visible labels on form elements (`<input
type="range">`). The label is positioned off-screen with proper contrast
to meet accessibility standards without affecting the visual design.
- Added `aria-hidden="true"` to the segments SVG element in
`MediaChromeRange` to prevent accessibility warnings about unlabeled
graphics.
- Added `aria-label` attribute to `MediaErrorDialog`.
- `MediaTimeDisplay` dynamically manages `role` and `tabindex` based on
interactivity state (`noToggle` and `disabled` attributes). When
interactive, it uses `role="button"` with `tabindex="0"`; when
non-interactive, it removes the role and sets `tabindex="-1"`. Event
listeners are now dynamically added/removed based on interactivity.
When checking the Accessibility tab in Firefox's developer tools, there
should be no warnings related to media-chrome components.
0 commit comments