Re: Considerations about the ARIA role textbox example in MDN
Sorry for not getting back to you for so long!
So, you are basically saying that using an ARIA role on an element that semantically has that role anyway is redundant, so for example:
they are only to be used when the element you are using does not semantically match the role you intended it for, e.g.
And you should only do this when you are unable to use the correct semantic element for some reason?
That being the case, I agree with you completely, from my understanding of ARIA roles. I hint at this in the guide to ARIA I wrote recently:
But maybe I should say it explicitly somewhere.
We also need to update the main MDN Accessibility section at some point, but I really don’t have the time right now.
All the best,
Senior tech writer || Mozilla
developer.mozilla.org || MDN
firstname.lastname@example.org || @chrisdavidmills
> On 17 Mar 2017, at 11:19, Germano Corrêa wrote:
> Hello! I'm new here, so I'm sorry for any mistakes.
> I was digging about WAI-ARIA roles, and I found out the MDN page about
> using the textbox role:
> As said in W3C's document Notes on Using ARIA in HTML (
> https://www.w3.org/TR/aria-in-html/), I shouldn't be redundant in
> implementing ARIA. Avoid using the role button in a button element, or in a
> input element which its type is "button", for instance.
> Considering this, it wouldn't redundant to use the textbox role in a input
> element which its type is text, or in a textarea element? Role's main
> objective it's to provide semantic information for assistive technologies
> when the native element can't provide de right information, or when the
> native element can't be used (or it doesn't exist). But, as far I know,
> native elements for text input already provide the right info, and
> assistive technologies display them correctly. Despite the fact that create
> a input text element "from scratch" doesn't sound like a good idea, and
> possibly this fact would make the textbox role useless, is there any better
> example for it?
> The button role, for instance, has an exemple using a simple div element,
> which later it would be stylized as a button and through JS it would have
> the same behavior as a button. Developers don't often create buttons from
> scratch, but it's a better example than using the role in button element.
> Shouldn't it be the same with textbox role, or am I missing something here?
> Germano Corrêa
> dev-mdc mailing list
> MDN contributor guide: http://bit.ly/ContributorGuide