-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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 issues #8954
Comments
Update: I discovered another one. The button to close a modal lacks a "aria-label" as well. This results in something that can almost be described as undefined behaviour; every combination of screen reader, browser and operating system will present this differently. In the case of Windows and the Jaws screen reader, this is announced as "unlabeled 1 button". In other environments it may simply be announced as "button". Others may just ignore it and entirely prevent the user from interacting with it. |
Hi @caturria, thanks for getting in touch! Accessibility is very important to me, and I'd like to get these issues resolved as quickly as possible. With regards to About the modal, I think that we can probably solve this with Alpine.js's "focus trapping" feature. The problem is that I haven't been able to get it to properly work yet with all of our form elements. However, I haven't tested it with Livewire 3, only Livewire 2, so there is a chance all the issues are fixed now. I will try to find time to test it out soon. |
Hi Dan, Thank you very much for getting back to me. In the interest of full disclosure, I am neither an expert on WGAC or the Aria spec. However, what I can say for sure is that different assistive technology products tend to interpret things differently, and the rules can be vague at times. <!DOCTYPE html>
<html>
<head>
<title>Nested aria-label test </title>
</head>
<body>
<form action="localhost" method="post">
<div aria-label="Test input:">
<span>
<div>
<input type="text"></input>
</div>
</span>
</div>
</form>
</body>
</html> I welcome correction if I'm wrong, but my understanding is that aria-labeledby, aria-label and even do not wrap collections; they rather apply to individual elements. |
Edit: I didn't realize that Github would not escape HTML tags. |
Hello! I'm getting back to this now after a couple of busy months. I've got some more information to you about our core implementations, and it would really help me if you could test a few things for me. To start with, the modals: The Alpine.js "trap" feature is now active in our modals. I've found this piece of code that sets the For the modal close button, it does actually have a label. The label is inside the <button type="button">
<span>
Close
</span>
</button> Please could you test that and let me know if it works with your screenreader? For the inputs: every input in Filament has a corresponding label that looks like this: <div>
<label for="inputId">
Label here
</label>
<div>
<input type="text" id="inputId" name="inputId" />
</div>
</div> Since this is directly assigned to the ID of the input element, I'm unsure why this would not be working. Can you try that example code above with your screenreader to see what happens? Thank you so much for your patience and support! |
Hi, First of all, I would like to apologize for taking a very long time to respond to this. Thank you. |
@caturria Were you able to look at this at all? |
Hi all, I sincerely apologize for taking so long to get back to you. What I do know so far is this:
|
Package
filament/filament
Package Version
^3.0-stable
Laravel Version
^10.10
Livewire Version
^3.0
PHP Version
8.2.6
Problem description
Hi,
First and foremost, I just wanted to say what an impressive package this is! As a blind person, this is the easiest way I've found so far to develop UIs without having to worry too much about what it looks like.
I have come across a couple of accessibility issues however. One has to do with form labels and the other involves modals.
When using a screen reader to interact with a Filament form, the screen reader sometimes fails to pick up the label. This is incredibly strange as usually an element is either accessible or it isn't, but here, every time you refresh the exact same form, it appears completely random whether a given form label will be readable or not.
Though this might be due at least in part to a bug in either Chromium and/or Microsoft's accessibility stack, the issue appears to stem from the fact that the text of a label is not a direct child of the element itself.
This can be solved either by adding aria-label="{{$label}}" to the element directly, or by rendering the "hidden" label unconditionally. In either case, you would then want to mark the visual label aria-hidden="true" to avoid any conflicts.
The other issue has to do with modals. When a modal is opened, the rest of the page contents should be marked using the aria-hidden attribute. It should also have either role="dialog" or role="alertdialog" which cause screen readers to issue a special notification that a dialog has opened. Otherwise, the user can interact with page contents that are supposed to be hidden by the modal. We also don't realize that a modal has opened up unless we manually scroll to the bottom of the page.
Please note: I am providing the live demo as a repository link as all of this is demonstrable using the demo.
Thank you for your attention to this.
Kind regards,
Jordan.
Expected behavior
Screen readers should always be able to identify form labels. Screen readers should not be able to see content that's supposed to be hidden by modal dialogs, and should notify users when a dialog has appeared.
Steps to reproduce
Reproduction repository
https://github.com/filamentphp/demo
Relevant log output
No response
Donate 💰 to fund this issue
The text was updated successfully, but these errors were encountered: