jpuri / react-draft-wysiwyg

A Wysiwyg editor build on top of ReactJS and DraftJS. https://jpuri.github.io/react-draft-wysiwyg
MIT License
6.38k stars 1.15k forks source link

Accessibilty ARIA issue #1372

Open brusand opened 1 year ago

brusand commented 1 year ago

Hi, i have an issue with the option toolbar when i check with axe.

Due to the line aria-selected={active} in src/components/options.js i have this issue
Expected the HTML found at $('#rdw-wrapper-5219 > .rdw-editor-toolbar.rsw-toolbar[aria-label="rdw-toolbar"] > .rdw-inline-wrapper[aria-label="rdw-inline-control"] > .rdw-option-wrapper[title="Bold"]') to have no violations:

<div class="rdw-option-wrapper" aria-selected="false" title="Bold"><img alt="" src="/assets/img/bold.svg"></div>

Received:

"Elements must only use allowed ARIA attributes (aria-allowed-attr)"

Fix any of the following:
  ARIA attribute is not allowed: aria-selected="false"

You can find more information on this issue here:
https://dequeuniversity.com/rules/axe/4.5/aria-allowed-attr?application=axeAPI

How to fixed it or customized it ? Thx Bruno