Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
1bf4dae
Reacreare PR-5801 to remove aria activedescendant and add a roving ta…
pksjce Jul 16, 2025
89fe0b6
Add the blue line indicator
pksjce Jul 21, 2025
8f152bc
Fix linting and tests
pksjce Jul 22, 2025
98fc899
fix action list item tests
pksjce Jul 22, 2025
883181f
Remove announcement for empty in SelectPanel. It get handled in useAn…
pksjce Jul 23, 2025
925b991
Fix merge conflicts
pksjce Jul 25, 2025
56d790b
Unnecessary changeset
pksjce Jul 25, 2025
2f0182c
Css fix for focus behavior
pksjce Jul 28, 2025
5ce1efc
Css fix for focus behavior
pksjce Jul 28, 2025
b2f4967
Add feature flag
pksjce Jul 28, 2025
9c548a2
Switch default to false
pksjce Jul 28, 2025
8bec686
fix the build
pksjce Jul 28, 2025
6db7ec5
Create pink-worms-kneel.md
pksjce Jul 28, 2025
f5b0c09
Fix up all the tests
pksjce Jul 29, 2025
bb173e1
css fix
francinelucca Jul 29, 2025
b9c8dcc
test(vrt): update snapshots
francinelucca Jul 29, 2025
e286689
move stuff around
francinelucca Jul 29, 2025
638594f
format
francinelucca Jul 29, 2025
ea6017c
re-add type
francinelucca Jul 29, 2025
008b0b6
moving stuff around to minimize diff
francinelucca Jul 29, 2025
1b7de74
re add conditional
francinelucca Jul 29, 2025
1fa934b
test(vrt): update snapshots
francinelucca Jul 29, 2025
59839c6
Revert "test(vrt): update snapshots"
francinelucca Jul 29, 2025
822c385
Revert "test(vrt): update snapshots"
francinelucca Jul 29, 2025
22caae0
Revert "Fix up all the tests"
francinelucca Jul 29, 2025
ae6812a
add FF to renderWithFlag
francinelucca Jul 29, 2025
134fb0f
Some FF tightening
pksjce Jul 29, 2025
f79e9cf
Fix the issue with enter key
pksjce Jul 29, 2025
1d2891a
Fix the enter button issue
pksjce Jul 29, 2025
fd281f0
Fix selectionvariant bug
pksjce Jul 29, 2025
ce16567
remove console statement
pksjce Jul 29, 2025
f504b56
Update .changeset/pink-worms-kneel.md
francinelucca Jul 29, 2025
31ae021
Merge branch 'main' into recreate-pr-5801-remove-aria-activedescendant
francinelucca Jul 29, 2025
c2c8843
Merge branch 'main' into recreate-pr-5801-remove-aria-activedescendant
francinelucca Jul 29, 2025
3a228d9
refactor
francinelucca Jul 29, 2025
b23a28f
fix tests
francinelucca Jul 29, 2025
c525ce9
Merge branch 'main' into recreate-pr-5801-remove-aria-activedescendant
francinelucca Jul 29, 2025
73c023a
remove unnecessary code
francinelucca Jul 29, 2025
f5babb1
Merge branch 'recreate-pr-5801-remove-aria-activedescendant' of githu…
francinelucca Jul 29, 2025
deb7881
format
francinelucca Jul 29, 2025
858959e
test fixes
francinelucca Jul 29, 2025
7c60e82
fix tests
francinelucca Jul 29, 2025
3dc4d98
move stuff around
francinelucca Jul 29, 2025
1eca2e7
Fix failing PageDown issue and activedescendant in group
pksjce Jul 30, 2025
a531bd4
group fixes
francinelucca Jul 30, 2025
5c7f422
Merge branch 'main' of github.com:primer/react into recreate-pr-5801-…
francinelucca Jul 30, 2025
09525c4
remove modern_action_list FF
francinelucca Jul 30, 2025
57d3032
lint
francinelucca Jul 30, 2025
8aa6272
Remove unncessary check
pksjce Jul 30, 2025
a36006d
add back list role removed
pksjce Jul 31, 2025
891b39d
Merge branch 'main' into recreate-pr-5801-remove-aria-activedescendant
pksjce Jul 31, 2025
41472fc
re-add useScrollFlash
francinelucca Jul 31, 2025
b55977a
Merge branch 'main' into recreate-pr-5801-remove-aria-activedescendant
francinelucca Jul 31, 2025
ccfdcce
re-add changes
francinelucca Jul 31, 2025
dc4ccfe
Merge branch 'recreate-pr-5801-remove-aria-activedescendant' of githu…
francinelucca Jul 31, 2025
0fbf871
fix test
francinelucca Jul 31, 2025
4271f2f
loading fix
francinelucca Jul 31, 2025
dd82743
add usingRemoveActiveDescendant conditional
francinelucca Jul 31, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/pink-worms-kneel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

feat(SelectPanel): remove aria activedescendant and add a roving tab index
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type {AriaRole} from '../utils/types'
type ContextProps = {
container?: string
listRole?: AriaRole
selectionVariant?: 'single' | 'multiple'
selectionVariant?: 'single' | 'multiple' | 'radio'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's 'radio'?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has radio buttons in modal. The type failed when I explicitly sent the prop in FilteredActionList

selectionAttribute?: 'aria-selected' | 'aria-checked'
listLabelledBy?: string
// This can be any function, we don't know anything about the arguments
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/ActionList/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const Item = React.forwardRef<HTMLLIElement, ActionListItemProps>(
const inactive = Boolean(inactiveText)
// TODO change `menuContext` check to ```listRole !== undefined && ['menu', 'listbox'].includes(listRole)```
// once we have a better way to handle existing usage in dotcom that incorrectly use ActionList.TrailingAction
const menuContext = container === 'ActionMenu' || container === 'SelectPanel'
const menuContext = container === 'ActionMenu' || container === 'SelectPanel' || container === 'FilteredActionList'
// TODO: when we change `menuContext` to check `listRole` instead of `container`
const showInactiveIndicator = inactive && !(listRole !== undefined && ['menu', 'listbox'].includes(listRole))

Expand Down
4 changes: 3 additions & 1 deletion packages/react/src/ActionList/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const List = React.forwardRef<HTMLUListElement, ActionListProps>(
listLabelledBy,
selectionVariant: containerSelectionVariant, // TODO: Remove after DropdownMenu2 deprecation
enableFocusZone: enableFocusZoneFromContainer,
container,
} = React.useContext(ActionListContainerContext)

const ariaLabelledBy = slots.heading ? (slots.heading.props.id ?? headingId) : listLabelledBy
Expand All @@ -42,7 +43,8 @@ export const List = React.forwardRef<HTMLUListElement, ActionListProps>(
disabled: !enableFocusZone,
containerRef: listRef,
bindKeys: FocusKeys.ArrowVertical | FocusKeys.HomeAndEnd | FocusKeys.PageUpDown,
focusOutBehavior: listRole === 'menu' ? 'wrap' : undefined,
focusOutBehavior:
listRole === 'menu' || container === 'SelectPanel' || container === 'FilteredActionList' ? 'wrap' : undefined,
})

return (
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/ActionList/Selection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const Selection: React.FC<React.PropsWithChildren<SelectionProps>> = ({se
return (
<VisualContainer className={className} data-component="ActionList.Selection">
{/* This is just a way to get the visuals from Radio, but it should be ignored in terms of accessibility */}
<Radio value="unused" checked={selected} aria-hidden tabIndex={-1} />
<Radio value="unused" checked={selected} aria-hidden tabIndex={-1} hidden />
</VisualContainer>
)
}
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/FeatureFlags/DefaultFeatureFlags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ export const DefaultFeatureFlags = FeatureFlagScope.create({
primer_react_segmented_control_tooltip: false,
primer_react_select_panel_fullscreen_on_narrow: false,
primer_react_select_panel_order_selected_at_top: false,
primer_react_select_panel_remove_active_descendant: false,
})
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@
flex-grow: 1;
}

.ActionListItem:focus {
background: var(--control-transparent-bgColor-selected);

&::after {
@mixin activeIndicatorLine;
}
}

.ActionListItem:where([data-input-focused]):where([data-first-child]) {
background: var(--control-transparent-bgColor-selected);

&::after {
@mixin activeIndicatorLine;
}
}

.FullScreenTextInput {
@media screen and (--viewportRange-narrow) {
/* Ensures inputs don't zoom on mobile iPhone but are body-font size on iPad */
Expand Down
Loading
Loading