-
-
Notifications
You must be signed in to change notification settings - Fork 380
Description
Feature request
Summary
Support vertical orientation on the Separator component.
Examples in other libraries
- https://www.radix-ui.com/primitives/docs/components/separator#root
- https://react-spectrum.adobe.com/react-spectrum/Divider.html#vertical
- https://ariakit.org/reference/separator#orientation
- https://tamagui.dev/ui/separator#separator-props
- https://mui.com/material-ui/react-divider/#orientation
Motivation
According to the WAI-ARIA spec, elements with role="separator" support aria-orientation="horizontal|vertical". Most libraries support vertical orientation so most users would expect to have a prop for it instead of adding aria-orientation="vertical" by themselves.
Alternatives
Don't provide a prop to change the orientation and just guide user on the docs to add the corresponding aria-orientation="vertical" attribute when in need of a vertical separator. This is already the case when users need to make a focusable/interactive separator, since they'd need to manage the aria-disabled, aria-valuemax, aria-valuemin, etc. attributes (see https://www.w3.org/TR/wai-aria-1.2/#separator), but interactive separators are way less common than static ones and could be considered an advanced use case.