campuspress / divi-accessibility

Improve Divi accessibility in accordance with WCAG 2.0 guidelines.
https://wordpress.org/plugins/accessible-divi/
GNU General Public License v2.0
126 stars 29 forks source link

Remove role="link" from anchor tags #52

Open MattWilsonMD opened 3 years ago

MattWilsonMD commented 3 years ago

The "ARIA support" option in the settings is useful, but I would advise you to remove the function that addsrole="link" to <a> tags. I advise this for two reasons:

  1. Screen readers already know that an tag is a link because of HTML semantics.
  2. Sometimes components such as a tabbed interface use an tag as a tab so we need it to say role="tab" to avoid confusion/conflicts.
nighswon commented 2 years ago

Supporting this! It gets flagged in our ADA review of Divi sites all the time.

joelhsmith commented 2 years ago

Same. The attribute is redundant.

mrwweb commented 2 years ago

This may be a slightly different issue, but I'll leave it as a comment for now. Yesterday I found a social icon link in the footer with role="button". The ARIA roles seem off enough that I've had to turn off the setting that adds them.

eartahhj commented 1 year ago

I don't know exactly what has happened in the time, but since this issue has been opened on July 2021, and after that:

Here: Note: Where possible, it is recommended that you use a native [<a>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a) element rather than the link role, as native elements are more widely supported by user agents and assistive technology. Native [<a>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a) elements also support keyboard and focus requirements by default, without need for additional customization.

I advise to remove role="link" from <a> tags since it is clearly redundant. Unfortunately, I see this very often around the web, for example in <main role="main"> or <nav role="navigation"> and I don't see why it would need to be specified two times.