Summary
Investigate whether the focusgroup HTML attribute can replace our custom RovingTabindexController. A polyfill is now available that makes this viable.
Motivation
Our RovingTabindexController is very complex and not very user-friendly to work with. Replacing it with focusgroup — a web standard currently in progress — would simplify our codebase and align us with the platform. Even while the standard is still being finalized, we can use the polyfill to get started and eventually drop it once browsers ship native support.
Background
The focusgroup HTML attribute is a proposed web standard that provides native roving tabindex behavior declaratively, eliminating the need for custom JavaScript controllers.
A polyfill is available: @microsoft/focusgroup-polyfill
Current usage
RovingTabindexController is currently used in the following components:
tool-bar
select
checkbox-group
radio-group
tab-group
menu
tag-list
toggle-group
The controller is defined in packages/components/shared/src/controllers/roving-tabindex.ts.
Tasks
Phase 1: Proof of concept
Phase 2: Broader rollout (if PoC is successful)
Summary
Investigate whether the
focusgroupHTML attribute can replace our customRovingTabindexController. A polyfill is now available that makes this viable.Motivation
Our
RovingTabindexControlleris very complex and not very user-friendly to work with. Replacing it withfocusgroup— a web standard currently in progress — would simplify our codebase and align us with the platform. Even while the standard is still being finalized, we can use the polyfill to get started and eventually drop it once browsers ship native support.Background
The
focusgroupHTML attribute is a proposed web standard that provides native roving tabindex behavior declaratively, eliminating the need for custom JavaScript controllers.A polyfill is available:
@microsoft/focusgroup-polyfillCurrent usage
RovingTabindexControlleris currently used in the following components:tool-barselectcheckbox-groupradio-grouptab-groupmenutag-listtoggle-groupThe controller is defined in
packages/components/shared/src/controllers/roving-tabindex.ts.Tasks
Phase 1: Proof of concept
RovingTabindexControllerwithfocusgroupin a single component (e.g.tool-bar)Phase 2: Broader rollout (if PoC is successful)
RovingTabindexControlleruse cases (e.g.focusInIndex,isFocusableElementcallbacks)focusgroupis a viable replacementRovingTabindexControllerfor any components wherefocusgroupfalls short