-
-
Notifications
You must be signed in to change notification settings - Fork 265
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
Accessibility: Buttons are coded as div
but should be button
elements
#286
Comments
div
but should be a button
elementdiv
but should be button
elements
Hi. The buttons were designed over a year ago, hence I can't remember the exact reason they are I currently have a significant backlog of work that I need to get through prior to this, but I really appreciate the feedback! |
@OvidijusParsiunas Thank you for the update. I believe, adding |
@OvidijusParsiunas I read your update that you are busy relocating so I thought maybe I could help with an update here for you? I have pulled the repository and made the changes locally, I'd be happy to share the changes. What do you think? |
Hey @imgiseverything. If you have the changes done that's great! You can definitely raise a PR! Just note that I am a very picky reviewer so I may request some changes to maintain our standards and consistency 😉 Thankyou for all your help! |
@OvidijusParsiunas Sure, I'd love to open a PR. I can't push to this repository because I do not have. Could I send you the code some other way? |
Hey, I recommend forking this repository and then create a PR that way. |
Add the semantic role of 'button' to the .inpout-button whenever it is created so a screen-reader user is told it is a button Add the tabindex attribute and value of '0' so a keyboard user can tab to the button and OvidijusParsiunas#286
Button semantics
The component rendered by
CustomButtonInnerElements
has been coded as a div. I am not sure of the design decision behind this but it would be better if the component was anbutton
with atype="submit"
attribute/value.Source:
deep-chat/component/src/views/chat/input/buttons/customButtonInnerElements.ts
Line 6 in 6f2f4ab
This would allow keyboard users to easily tab to the button and a screen-reader user would be informed that it is a 'button'
If that is too tricky, an alternative would be to add the role of
button
to the element e.g.This would tell a screen-reader user that the div is being treated as an input, semantically it would become an input and tabindex="0" would allow a user to tab to the element.
Note
It's not 100% clear how customButtonInnerElements.ts, button.ts and submitButton.ts work so setting the 'button' to be a
button
may need to take place ina. different component to 'CustomButtonInnerElements'The text was updated successfully, but these errors were encountered: