Re: False positive error in Nu HTML Checker for tabindex="-1" inside interactive control

On 24 Apr 2019, at 16:40, Patrick H. Lauke wrote:

> from a recent validation run for an accessibility audit: while it 
> makes sense that tabindex inside an interactive control should be 
> flagged, I'm getting false positives for a tabindex="-1" (which yes, 
> could hint at this element perhaps getting programmatic focus in some 
> way, but not necessarily...so maybe a warning rather than an error?)

Elements that are `tabindex="-1"` are focusable but not in the tab order 
for keyboard navigation.

It doesn't require any additional programming to make something 
focusable. See [this live example][1]:

     <div class="focusable" tabindex="-1">
       Hello
     </div>

and

     .focusable {
       background: #aaa;
       padding: 4px;
       display: inline-block;
     }

     .focusable:focus {
       outline: dotted orange 3px;
     }

Clicking on the div will give it the focus and apply the outline to it.

I don't think this is an error

[1]: https://jsbin.com/yopavaviku/edit?html,css,js,output

Received on Thursday, 25 April 2019 07:45:45 UTC