Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add associated label to textarea #451

Open
emmalcg opened this issue Jun 14, 2024 · 1 comment
Open

How to add associated label to textarea #451

emmalcg opened this issue Jun 14, 2024 · 1 comment
Labels
question Further information is requested

Comments

@emmalcg
Copy link

emmalcg commented Jun 14, 2024

Hey! i am wondering if there is anyway to add additional attributes to editor and menus. Most importantly, I would like to add a label element for the rendered editor (the div with the role of textbox) for accessibility reasons. I would be able to do so if this element had a unique id but i do not see one on the rendered element. Is there a way to add a label that is bound to this textbox, or a way to add additional attributes (like id or even aria attributes) to the rendered elements?

<div spellcheck="false" autocorrect="off" autocapitalize="off" translate="no" contenteditable="true" style="tab-size: 4;" class="cm-content cm-lineWrapping" role="textbox" aria-multiline="true" data-language="json" aria-autocomplete="list"><div class="cm-activeLine cm-line" style="padding-left: calc(2ch + 6px); text-indent: calc(-2ch + 0px);">{}</div></div>

@josdejong
Copy link
Owner

josdejong commented Jun 19, 2024

Thanks for your suggestion. Improving accesibility sounds like a good idea in general :) I think we should do that in the editor itself.

If I'm correct you're referring to the input field that opens when you double click a key or value, so that you can edit this field? We can add a label attribute there. I'm not sure what would be a good contents for it. "Editing key" and "Editing value" for example?

Are there more places where we need to improve accessibility?

@josdejong josdejong added the question Further information is requested label Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants