patternfly / patternfly/patternfly-react

Drawer - automatically manage focus when drawer is opened/closed

Offen
#8,534 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

A11y Breaking change :boom: PF Team
Vorherrschende Sprache
TypeScript
Sterne
862
Forks
392
Ø Merge
4 T. 8 Std.
Gemergte PRs (30 T.)
9

Beschreibung

Follow up for core issue https://github.com/patternfly/patternfly/issues/5319
A more consistent solution than was used to fix https://github.com/patternfly/patternfly-react/issues/8394

move the close button to the top of the drawer body rather than the end.

The modal component automatically places focus on the first interactable element in the modal when it is opened.
In the case of the Drawer, that should be the close button by default.
If the close button is not provided, then it should be the first interactable element in the drawer.
If there are no interactable elements, focus should be placed on the drawer body.

Like the modal, this should happen automatically for the drawer, unless overridden by the consumer.

When the drawer is closed, focus should be returned to the drawer toggle - or at least, the props needed for the consumer to implement this focus management should be exposed. All related examples/demos should be updated to use this behavior (including the wizard with drawer)


Jira Issue: PF-145

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, das Fokusverhalten von Drawer mit dem bestehenden Verhalten von Modal zu vergleichen und die Drawer-Beispiele einschließlich des Wizards mit Drawer zu prüfen. Implementiere das angegebene Fokusverhalten beim Öffnen und Schließen mit Überschreibungen durch Consumer und aktualisiere anschließend alle zugehörigen Beispiele und Demos. Als abgeschlossen gilt die Arbeit, wenn der Fokus je nach Situation den Schließen-Button, das erste interaktive Element oder den Drawer-Inhalt erreicht und beim Schließen zum Drawer-Toggle zurückkehrt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
react, typescript
Bereich
accessibility, frontend
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.