Accessibility: role=document inside role=application reports bogus error
brennanyoung opened this issue · comments
The spec for role=document
says that it should contain (browsable) rich text content. The use-case is when you are in forms/applications mode and you want to re-enter browse mode.
I notice that the accessibility dev tools flags this with the warning "Focusable elements should have interactive semantics".
That's mostly true. But the document role is different. It's intended to be both focusable and non-interactive. That's the use case. It's the only focusable element which should behave like that. This is a bogus warning, and therefore a bug.
Here's a codepen which shows the nesting of a document inside an application. The nested document has a tabindex
of zero, so that you can move from interaction to browsing. This is exactly according to the spec.
https://codepen.io/brennanyoung/pen/jOEVRRv
Links to (and citations from) the relevant parts of the spec are given in that codepen.
wrong git! sorry