Skip to content

Conversation

ngxson
Copy link
Collaborator

@ngxson ngxson commented May 14, 2025

Fix #13531

NOTE: we don't aim to be WCAG compliant because we're currently lack of time & efforts to do that. However, what we can do is to make the UI usable with a screen reader

I used MacOS VoiceOver to test this, still not very happy about it because I don't know if it works well on all browsers.

At least on Firefox, I can select every button now (using tab) and their labels are being read correctly.

On safari, it just tells that there is a button without a label, which is quite annoying. Also, safari skip entirely the "upload file" button next to the "send message" button

Also, maybe because I don't know how to use a screen reader, but toast messages don't seem to be picked up (even though they use correct aria-live ; the toast notification function is provided by react-hot-toast package) - A simple test case is to click on the "send" button without entering any message, it should read an error "Please enter a message"

@domasofan can you check if this is now usable?

@isaac-mcfadyen
Copy link
Contributor

toast messages don't seem to be picked up (even though they use correct aria-live ; the toast notification function is provided by react-hot-toast package)

Likely related Issue on the react-hot-toast GitHub: timolins/react-hot-toast#335

@domasofan
Copy link

domasofan commented May 16, 2025

Will try when some binaries are available. Using Firefox/Edge with NVDA on Windows.
Or can i sideload that somehow?

@ngxson
Copy link
Collaborator Author

ngxson commented May 16, 2025

@domasofan unfortunately we cannot build binary from PR on our CI.

one way to test this is to run frontend part locally, while using a prebuilt server for API

to get the frontend up in dev mode, install nodejs and run:

cd tools/server/webui
npm i
npm run dev

@domasofan
Copy link

Just had a look at the ui.
Looks pretty well from here using Firefox and NVDA on Windows.
The Settings and Themes buttons seem to have also the word settings and themes as text near them.
So basically it seems that the words seem also to be just somewhere in the page itself.
I know that sounds a little bit confusing.

How will inserting images from the clipboard work? will there be a button for that or are just pasting it into the page?

@ngxson
Copy link
Collaborator Author

ngxson commented May 16, 2025

Thanks for testing. It seems like some buttons has both tooltip and aria-label which makes it being read twice, even though I explicitly disable the tooltip. Tbh I'm not experienced enough to handle the tooltip, so if someone knows please comment. For now, I'll simply remove the aria-label

For the image, you can Control+C an image from your file system, then Control+V while you're focusing on the input text area. The second option to upload an image is via the "Upload file" button. But I'm not even sure if it's currently focus-able or not, some browsers just skip the button entirely.

Can you check if the "Upload button" is there? The layout of the input area is:

  • Input text: "Type a message (Shift+Enter to add a new line)"
  • Upload button
  • Send button

@domasofan
Copy link

no problem. this can be resolved later as well.

yes the upload button is there and working.

@ngxson
Copy link
Collaborator Author

ngxson commented May 16, 2025

@domasofan I tried to fix some labels being read twice as you reported, it works with Firefox + VoiceOver in my case. Could you give it a try?

I also added the "Skip to main content" in the sidebar, right above the "Conversations" header.

I'm also thinking about making it easier to navigate when you have a lot of conversations in the list, maybe a search bar, will do that in the future. Let me know if you have other ideas.

@ngxson
Copy link
Collaborator Author

ngxson commented May 16, 2025

And also, I think the Settings dialog is not very accessible for the moment. Upon clicking it, I have to skip through a lot of things on the main layout just to get to the Settings dialog. Please let me know if this is a problem for you.

@domasofan
Copy link

shouldn't be normally. but i will have a look at it and report back in a new issue.

@ngxson ngxson merged commit aea9f8b into ggml-org:master May 16, 2025
6 checks passed
infil00p pushed a commit to baseweight/llama.cpp that referenced this pull request May 22, 2025
…13551)

* webui : improve accessibility for visually impaired people

* add a11y for extra contents

* fix some labels being read twice

* add skip to main content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

webui: Make the Web UI more accessible for blind users
4 participants