RedHat-UX / red-hat-design-system

Red Hat's Design System
https://ux.redhat.com
MIT License
100 stars 20 forks source link

[feat] Create `<rh-dropdown>` element #425

Open wesruv opened 2 years ago

wesruv commented 2 years ago

Description

Make a dropdown that can accept links or buttons that has the correct a11y properties.

PFE-Dropdown was a solid attempt at this but the aria attributes are setup incorrectly, see: https://github.com/patternfly/patternfly-elements/issues/2054#issuecomment-1178799554

I don't know anything about Patternfly React's dropdown, but it looks like it's following the same design and has features I'd be interested in: https://www.patternfly.org/v4/components/dropdown

One pattern that PFE didn't cover that it looks like PF React Dropdown did was the dropdown should close if it loses focus, and you should only be able to have one open at a time.

Acceptance Criteria

Image

image

Link to design doc

https://www.patternfly.org/v4/components/dropdown/design-guidelines

Other resources

No response

wesruv commented 2 years ago

I switched up the labels to what I think sounded right.

bennypowers commented 2 years ago

See also https://github.com/patternfly/patternfly-elements/issues/2049

markcaron commented 9 months ago

Blocked by PFE 3.0 release (https://github.com/patternfly/patternfly-elements/pull/2596)