This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Use ARIA to send keyboard focus to certain elements. A use case could look something like: 1. Indicate using ARIA (within the body of html?) that <H1> and <H2> get keyboard access. 2. User agents then render this page where all <H1> and <H2> headers receive keyboard focus. If this sounds convincing, the same logic could be applied to important text alerts in red, instructional text that adjacent to the form control, etc. etc.
Hi Devarshi, it sounds like what you are describing is already achievable via setting the tabindex="0" attribute in html? Perhaps you'd like to confirm that tabindex can be controlled via CSS selector? I don't know off hand if all browser implement this. Please reopen if you disagree, but I think ARIA is the wrong place for this request.
(In reply to comment #1) > Hi Devarshi, it sounds like what you are describing is already achievable via > setting the tabindex="0" attribute in html? > Perhaps you'd like to confirm that tabindex can be controlled via CSS selector? > I don't know off hand if all browser implement this. > Please reopen if you disagree, but I think ARIA is the wrong place for this > request. Hi David, Isn't tabindex="0" applied per element for it to receive keyboard focus? I was hoping that using ARIA, a group of elements (in this case, headers) could have been given keyboard focus at one go. Not sure about CSS. -Devarshi
I think an aria equivalent of tabindex="0" might be a good idea, like specifying role="xstop" (where "x" is H [heading] or P [paragraph]) in a <div> would allow developers to set keyboard focus on such elements. Reopening in case anyone wants to chime in and brainstorm. -Devarshi
ARIA is not allowed to change browser behaviour. tabindex is the correct way to ensure something gets focus. It would be nice to be able to apply tabindex via CSS IMO but that is an ask of another group.