addyosmani/a11y

Inconsistent reporting for aria-labelledby on an input with type="tel"

Closed this issue · 2 comments

I have this in a file called test.html:

<div>
    <label id="mobile-label" for="mobile">Mobile number</label>
    <input name="mobile"
        id="mobile"
        type="tel"
        aria-labelledby="mobile-label">
</div>
<div>
    <label id="firstname-label" for="firstname">Fornavn</label>
    <input name="firstname"
        id="firstname"
        type="text"
        aria-labelledby="firstname-label">
</div>

When I run a11y test.html the output is

× This element has an unsupported ARIA attribute
#firstname

Expected output was

× This element has an unsupported ARIA attribute
#mobile
#firstname

If I change from type="tel" to type="text" in the first field I get the expected output so it seems that either that ARIA attribute is supported for type="tel" or inputs with that type is not evaluated correctly.

This was observed with v0.3.3

OK, this is getting wierd now.

I decided to try to dig into this and see if it was something I'd be able to fix. In ubuntu on node v4.0.0 a11y does not complain about the attribute on #firstname while on Windows 7 with node v4.1.2 it does.

I am no longer sure what the correct behaviour is.

To add to that, after cloning this repo and running node cli.js test.html on ubuntu with node v4.0.0 I do get an error on the #firstname field.

When I clone ADT and use the cli runner there it doesn't complain again.

With a11y using v2.9.0-rc.0 of ADT there's no reported error so I figure it was something that was fixed. Sorry about the noise.