- Issue created by @kentr
- 🇺🇸United States kentr Durango, CO
Clarified in STR that it's with the standard installation profile.
- 🇮🇳India anweshas Kolkata
I’d like to work on this issue.
I’ll start by reproducing the problem on a fresh Drupal site with the Gin theme enabled, using Axe and/or Accessibility Insights to confirm which toolbar links and buttons are missing accessible names.
Next, I’ll review the relevant template or markup in Gin to add proper accessible names using either visible text, aria-label, or aria-labelledby, ensuring that the fix passes accessibility audits.
I’ll post my findings and a patch/MR here for review.
- Merge request !655Issue #3539420: Fixed accessible text for toolbar links and buttons. → (Open) created by Unnamed author
- 🇮🇳India anweshas Kolkata
I have pushed my code changes. Here are the results.
- 🇮🇳India anju.philip@zyxware.com
Hi, I've verified and tested MR!655 and applied the patch successfully on 5.0.x-dev version. The changes are not working as expected.
- Go to Appearance.
- Enable Gin Admin Theme and set it as the default admin theme.
- Create Some Content: Go to Content > Add content > Test Content
- Navigate to /admin.
- Collapse the Gin sidebar into icon-only mode.
- Run accessibility tests using:Axe (Browser extension),NVDA (screen reader)
- Observed the changes here
Testing Result:
After applying the patch, the toolbar items are still not accessible as expected.NVDA screen reader does not announce the toolbar icons.Axe still reports the following issues: “Links must have discernible text”, “Buttons must have discernible text”
Attaching the screenshot for reference.Thanks
- 🇮🇳India anju.philip@zyxware.com
Hi,
I've verified and tested MR!655 and successfully applied the patch on the 5.0.x-dev version. I followed the steps #9 for testing.Testing Results:
Axe: The previously reported issues — “Links must have discernible text” and “Buttons must have discernible text” — are now resolved after applying the patch.
NVDA: The screen reader does not announce the toolbar icons when the sidebar is collapsed. This issue still exists.
Attaching a screenshot for reference.Thanks,
- 🇺🇸United States kentr Durango, CO
It looks like the MR uses
aria-label
in places where there's already text.I believe the problem is that all of the existing text is hidden with
display: none
(which completely hides an element, even from AT).My suggestion is to avoid
aria-label
and hide the text names visually, so that they are still available to assistive tech. This avoids redundancy, and recent Slack discussions in the#accessibility
channel indicate that visually-hidden text is preferred overaria-label
. There's more information on that in the issue summary.My quick experiment indicated that using core's
visually-hidden
CSS solves the problem.Off the top of my head, I think it would be possible to replicate the CSS rule into a selector that applies to the text of the elements (they appear to all be wrapped in
span
) when the toolbar is collapsed. Maybe there's already a selector for this state. I don't remember. I also don't know what the Gin maintainers prefer regarding implementation.