[feat]: add `aria-orientation` support to `TabsAriaController`
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 57/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- accessibility, frontend
Direzione di ricerca
Start with core/pfe-core/controllers/tabs-aria-controller.ts and trace how pf-v5-tabs supplies its tablist and vertical state, then check how RovingTabindexController reads orientation. Implementing this spans controller ownership, component wiring, runtime orientation changes, and SSR behavior; the issue names controller tests as the place to cover horizontal, vertical, and switching orientation. Done when the tablist exposes the correct orientation and keyboard navigation follows it.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
TabsAriaController does not set aria-orientation on the tablist, and nothing wires a tabs element's vertical/horizontal state into the accessibility tree.
Current state
TabsAriaController (core/pfe-core/controllers/tabs-aria-controller.ts) only:
- sets
role="tab"androle="tabpanel"on slotted children - sets
aria-controlsandaria-labelledbyinhostUpdated()
It never touches the tablist itself. In pf-v5-tabs, the tablist is an inner <div id="tabs" role="tablist"> with no aria-orientation, while the element has a vertical boolean that only drives styling.
// tabs-aria-controller.ts
hostUpdated(): void {
for (const [tab, panel] of this.#tabPanelMap) {
panel.setAttribute('aria-labelledby', tab.id);
tab.setAttribute('aria-controls', panel.id);
}
}
Problems
-
Missing ARIA state. A vertical tablist has no
aria-orientation="vertical", so assistive tech reports the wrong orientation. Per the ARIA spec,aria-orientationdefaults tohorizontalontablist, so a vertical tablist is actively announced incorrectly. -
Keyboard behavior is not orientation-aware.
ATFocusController.onKeydownreadsaria-orientationfrom the items container to decide which arrow keys move focus:const orientation = this.options.getOrientation?.() ?? this .#itemsContainerElement ?.getAttribute('aria-orientation') as 'horizontal' | 'vertical' | 'grid' | 'undefined';Because the tablist never has the attribute and
pf-v5-tabsdoes not passgetOrientationtoRovingTabindexController, both Left/Right and Up/Down move focus in a horizontal tablist. The APG tabs pattern expects Left/Right for horizontal tablists and Up/Down for vertical ones. -
Duplicated ownership.
role="tablist"is hardcoded in thepf-v5-tabsrender while the rest of the tabs ARIA is managed by the controller. This split makes it easy for one side to drift from the other.
Proposed direction
- Add tablist ARIA management to
TabsAriaController, includingaria-orientation. - Accept an orientation source in
TabsAriaControllerOptions, for exampleorientation?: 'horizontal' | 'vertical'orgetOrientation?: () => 'horizontal' | 'vertical', and reflect it toaria-orientationon the tablist (omit the attribute for the horizontal default, or set it explicitly, whichever the team prefers). - Give the controller a way to reference the tablist element. Since the host is not the tablist in
pf-v5-tabs, this likely needs an option such asgetTabList?: () => HTMLElement | null, or a documented contract that the host itself carriesrole="tablist". - Feed the same orientation to
RovingTabindexControllerviagetOrientation, or rely on the attribute once the controller sets it on the items container. - Consider moving
role="tablist"ownership into the controller as part of this change. - Keep the SSR path safe (
isServerguard) and add controller tests covering horizontal, vertical, and switching orientation at runtime.
Impacted components
core/pfe-core/controllers/tabs-aria-controller.tselements/pf-v5-tabs<pf-v6-tabs>implementation in #3040
Related issues
- #3040
Jira Issue: FELT-5230
- Lingua principale
- TypeScript
- Stelle
- 397
- Fork
- 109
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi 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.
Altre issue di patternfly/patternfly-elements
-
[feat]: support non-element `ReactiveControllerHost` in pfe-core controllersForse di nuovo libera @bennypowers l’ha presa 30 giorni fa e non c’è nessuna pull request aperta. Apertabreaking change feature needs discussion
patternfly/patternfly-elements#3166 · 1 assegnatario ·
-
[bug] ssr-shims.js uses deprecated globalThis.litSsrCallConnectedCallbackForse già presa @zeroedin l’ha presa 106 giorni fa. Apertabug
patternfly/patternfly-elements#3158 · 1 assegnatario ·
-
chore: evaluate removing isolatedDeclarations from tsconfigForse di nuovo libera @bennypowers l’ha presa 196 giorni fa e non c’è nessuna pull request aperta. Aperta
patternfly/patternfly-elements#3136 · 1 commento · 1 assegnatario ·
-
chore: update docs scaffolding for v6 elementsForse di nuovo libera @zeroedin l’ha presa 196 giorni fa e non c’è nessuna pull request aperta. Apertadocs
patternfly/patternfly-elements#3131 · 1 assegnatario ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
patternfly/patternfly-elements#3122 ·
Tutte le issue di patternfly/patternfly-elements
Issue simili
-
[Site] Active section detection should respect scroll-margin-topForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaarea/web reproduced type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
anomalyco/opencode#65384 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
swc-project/swc-ai-issues#1001 ·
-
Add: Da Vinci Asia VietnamApertacheck:passed streams:add
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
fix(table): CollapseColumn uses wrong caret icon for expandable row toggleForse già presa @redhat-chai-bot l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
patternfly/patternfly-react#12727 ·
I maintainer di solito rispondono entro 1 giorno
-
CLI OAuth login fails behind an authenticating proxy: GET /api/v1/user omits Proxy-AuthorizationAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
lightdash/lightdash#33086 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno