Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Bug] Modal hardcodes aria-labelledby and aria-describedby pointing to nonexistent element IDs

Aperta
#1,864 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@PARTH-TUSSLE ci sta già lavorando.

Dal 10/10/2026.

  • #1868 di @PARTH-TUSSLE — aperta

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

component/ui kind/bug language/typescript
Current Behavior

In Sistent's Modal component (src/custom/Modal/index.tsx, lines 182–183), the underlying StyledDialog hardcodes:

  • aria-labelledby="alert-dialog-slide-title"
  • aria-describedby="alert-dialog-slide-description"
    However:
  1. The rendered title element (<Typography data-testid="modal-title">{title}</Typography>) does not carry id="alert-dialog-slide-title".
  2. There is no element rendered with id="alert-dialog-slide-description".
  3. Because these IDs are static strings rather than dynamically generated (e.g., via React.useId()), any future attempt to attach static IDs would also produce duplicate-ID DOM collisions when multiple modals exist in the component tree.
  4. Screen readers and automated accessibility audits (e.g., axe, Lighthouse) flag aria-labelledby and aria-describedby referencing nonexistent element IDs.
    Currently, consumers must rely on conditional mounting ({isOpen && <Modal ... />}) as a workaround to avoid tree-level accessibility collisions.
Expected Behavior
  • aria-labelledby should reference the ID of the modal's rendered title component.
  • The ID should be unique per modal instance (using React.useId() or an overridable id / aria-labelledby prop) so multiple dialogs do not collide in the DOM.
  • If no description element is rendered, aria-describedby should not be attached by default unless explicitly supplied by consumer props.
Screenshots/Logs
Environment

Contributor Guides and Resources
Lingua principale
TypeScript
Stelle
140
Fork
243
Merge medio
6g 23h
PR unite (30g)
13

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di layer5io/sistent

Tutte le issue di layer5io/sistent

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.