patternfly / patternfly/patternfly-react
Bug - [Popover] - [accessibility issues with footer, header, and heading]
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 862
- Fork
- 392
- Merge medio
- 4g 8h
- PR unite (30g)
- 9
Descrizione
Describe the problem
Accessibility issues for Popover element:
- with
footerContentprop - with
headerContentprop - with default value
h6ofheaderComponentprop
Heading levels should only increase by one
https://dequeuniversity.com/rules/axe/4.9/heading-order
<h6 class="pf-v5-c-popover__title-text"><div>Popover header</div></h6>
Document should not have more than one banner landmark
https://dequeuniversity.com/rules/axe/4.9/landmark-no-duplicate-banner
<header class="pf-v5-c-masthead pf-m-display-inline ws-masthead">
Related node:
<header class="pf-v5-c-popover__header"><div class="pf-v5-c-popover__title" id="popover-pf-17234753664484trsgdfq2md-header"><h6 class="pf-v5-c-popover__title-text"><div>Popover header</div></h6></div></header>
Document should not have more than one contentinfo landmark
https://dequeuniversity.com/rules/axe/4.9/landmark-no-duplicate-contentinfo
<footer class="pf-v5-c-page__main-section ws-org-pfsite-l-footer">
Related node:
<footer class="pf-v5-c-popover__footer" id="popover-pf-17234753664484trsgdfq2md-footer">Popover footer</footer>
Ensures landmarks are unique
https://dequeuniversity.com/rules/axe/4.9/landmark-unique
<header class="pf-v5-c-masthead pf-m-display-inline ws-masthead">
Related node:
<header class="pf-v5-c-popover__header"><div class="pf-v5-c-popover__title" id="popover-pf-17234753664484trsgdfq2md-header"><h6 class="pf-v5-c-popover__title-text"><div>Popover header</div></h6></div></header>
<footer class="pf-v5-c-page__main-section ws-org-pfsite-l-footer">
Related node:
<footer class="pf-v5-c-popover__footer" id="popover-pf-17234753664484trsgdfq2md-footer">Popover footer</footer>
How do you reproduce the problem?
- Visit https://www.patternfly.org/components/popover/#basic
- Click Toggle popover button.
- Scan page with axe DevTools and ignore the last issue as irrelevant.
Expected behavior
Render markup that passes axe DevTools rules.
Is this issue blocking you?
No, we will fix 10 occurrences as follows:
- Move occurrences of
footerContent, orheaderContent, or both, to props of a pure presentation component that composes them withbodyContentand returns markup forbodyContentprop ofPopoverelement. That is, replacefooterandheaderelements withdivelements that have PatternFly classes for same visual appearance. - Render (instead of heading element)
pelement that has PatternFly class for same visual appearance, but takes out of heading hierarchy of page. Similar solution as our workaroundcomponent="p"prop forAlertelements that do not seem to fit heading hierarchy of page.
Screenshots
What is your environment?
- OS: macOS 14.6.1
- Browser: Chrome 127
- PatternFly: react-core 5.2.2
What is your product and what release date are you targeting?
Red Hat Advanced Cluster Security
Any other information?
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con il componente Popover e l’esempio di base di Popover all’indirizzo patternfly.org/components/popover/#basic, quindi riproduci le violazioni segnalate con axe DevTools. Aggiorna le dieci occorrenze in modo che il contenuto di footer e header utilizzi markup di presentazione non landmark e che l’header predefinito non aggiunga più un livello di intestazione inappropriato; il lavoro è completato quando le regole axe segnalate vengono superate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- react, typescript
- Ambito
- accessibility, frontend
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100