From:  Chris Mills <cmills@mozilla.com>
Date:  29 Mar 2017 20:57:48 Hong Kong Time
Newsgroup:  news.mozilla.org/mozilla.dev.mdc
Subject:  

Re: Considerations about the ARIA role textbox example in MDN

NNTP-Posting-Host:  63.245.214.181

Hi Germano,

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: https://developer.mozilla.org/en-US/docs/Learn/Accessibility/WAI-ARIA_basics#Practical_WAI-ARIA_implementations 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, Chris Mills Senior tech writer || Mozilla developer.mozilla.org || MDN cmills@mozilla.com || @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: > > https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/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? > > Thanks, > Germano Corrêa > _______________________________________________ > dev-mdc mailing list > dev-mdc@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-mdc > MDN contributor guide: http://bit.ly/ContributorGuide