5 ms·
Flexbox order doesn't affect accessibility tree order, so that's bad for accessibility. DOM order should make semantic sense.
by felixfbecker 3y ago
Flexbox order doesn't affect accessibility tree order, so that's bad for accessibility. DOM order should make semantic sense.
- ricardobeat 3y agoManaged tabindex would solve that. Sounds like a nightmare to maintain though.
- felixfbecker 3y agotabindex only affects tab order (of interactive elements), not the order that a screen reader navigates and reads out content (including non-interactive elements)
- megaman821 3y agoThere is a new reading order attribute coming to fix this.
- Lorin 3y agoWhy wouldn't they just amend the existing feature so it's accessible?
- _heimdall 3y agoBackwards compatibility I'd assume. Someone could have taken advantage of the fact they flex order and accessibility order are different. Changing the functionality now would break those sites, adding a new CSS prop would make the fix opt-in.
- felixfbecker 3y agoThere already is one in ARIA that supports this: aria-owns [1] and to some degree aria-flowsto [2] But with everything in ARIA, it always depends on real-world support of screen readers, which is very poor. You have to work with what actually works unfortunately. Imo changing order just to change the streaming order for a tiny performance gain is not worth breaking the UX for people with accessibility needs. [1] https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-owns https://developer.mozilla.org/en-US/docs/Web/Accessibility/A... [2] https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-flowto https://developer.mozilla.org/en-US/docs/Web/Accessibility/A...
- paulddraper 3y agoAnd how is <slot> for accessibility?