Skip to content

Document action buttons: "rejected" state rendered incorrectly #2113

@cyberbaloo

Description

@cyberbaloo

Bug Report

Problematic behavior
The document action buttons use aria-haspopup="true" (deprecated boolean value) combined with aria-expanded="false". VoiceOver announces these buttons as "rejected" instead of properly announcing the menu state:

<button
  aria-label="Ouvrir le menu des actions du document : 🇫🇷 LaSuite - documentation interne"
  aria-haspopup="true"
  aria-expanded="false"
>

Expected behavior/code
The button must be rendered with its correct state, for example: "Open document actions menu: LaSuite - internal documentation, collapsed menu, button".

Steps to Reproduce

  1. Open the Docs homepage with VoiceOver active
  2. Navigate to a document's action button
  3. VoiceOver announces "rejected" instead of the menu state

Possible Solution
Replace aria-haspopup="true" with aria-haspopup="menu":

<!-- Avant -->
<button
  aria-label="Ouvrir le menu des actions du document : ..."
  aria-haspopup="true"
  aria-expanded="false"
>

<!-- Après -->
<button
  aria-label="Ouvrir le menu des actions du document : ..."
  aria-haspopup="menu"
  aria-expanded="false"
>

Additional context/Screenshots
This issue potentially affects all buttons using aria-haspopup="true" throughout the application, particularly the language selector in the header.

This issue affects all submenus in the interface, particularly the menu in the left sidebar and in "All documents".

Ressources : MDN_ Developer Mozilla
Critères RGAA

Critère 7.1 : Chaque script est-il, si nécessaire, compatible avec les technologies d'assistance ?

Impact
A blind user navigating with a screen reader hears "rejected" on each document action button. They cannot identify the menu state or understand that the button opens an action menu.

Metadata

Metadata

Assignees

Type

Projects

Status

No status

Status

In review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions