react-ace icon indicating copy to clipboard operation
react-ace copied to clipboard

Accessibility Issue observed - Functions>Form control element <textarea> has no associated label

Open deepakb2410 opened this issue 4 years ago • 7 comments

Problem

Functions>Form control element

Sample code to reproduce your issue

<AceEditor className={getClass('ace', ['editor'])} editorProps={EditorProps} mode={mode} name={${mode}-editor} onChange={value => this.onCodeChange(value)} setOptions={EditorOptions} theme={EditorTheme.CHROME} value={content} />

References

Adding screen shot screenshot

Progress on: # "react-ace": "^6.3.2"

deepakb2410 avatar Aug 05 '21 03:08 deepakb2410

This issue also still persists when checking the accessibility through Axe. Is there a resolution to this problem or a workaround?

Shane79717 avatar Feb 15 '22 15:02 Shane79717

Can I know who own this issue and when it could fix? Thanks.

wlinacdl avatar Apr 01 '22 02:04 wlinacdl

Can I know who own this issue and when it could fix? Thanks.

I do not own this particular issue. There is a workaround using Vanilla JavaScript to find the DOM element through the class name or ID, and then append the aria-label attribute onto the element. Another approach is wrapping the AceEditor component with the label element, which should hopefully resolve the accessibility issue mentioned above. The second option should be much quicker, rather then interrogating the DOM.

Shane79717 avatar Apr 01 '22 07:04 Shane79717

Is there an estimated time on getting this issue fixed?

masonmullendore-ti avatar Aug 01 '22 22:08 masonmullendore-ti

Hi,

Do we have any idea if and when this will get fixed?

akshilverma avatar Apr 12 '23 05:04 akshilverma

This is how I did it in react:

<AceEditor
...
onLoad={(editor) => {
  ....
  editor.textInput.getElement().ariaLabel = "editorTextarea";
}}
/>

YoniChechik avatar Apr 27 '23 16:04 YoniChechik

It doesn't work @YoniChechik hmm

I realize that you need to have enabled new option: keyboardAccessibilityMode

mateBe95 avatar Jul 24 '23 08:07 mateBe95