Skip to content

[Tabs] wrong keyboard nav on RTL layouts #468

Closed
@felixmosh

Description

@felixmosh

Bug report

Current Behavior

When the layout applies direction: rtl, tabs are rendered correctly (the first tab at the most right) but when navigating
https://user-images.githubusercontent.com/9304194/108892474-940b6700-7618-11eb-9e52-c7df4a12de76.mov

Expected behavior

When direction: rtl is applied, the arrows should switch in behaviour

Reproducible example

CodeSandbox Example

Suggested solution

direction is an inherited property, this means that your can test once computedStyles of the tabs root element, and switch if it is rtl

Additional context

reach/reach-ui#235

Your environment

Software Name(s) Version
Radix Package(s) tabs 0.0.5
React n/a
Browser
Assistive tech
Node n/a
npm/yarn
Operating System

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: EnhancementSmall enhancement to existing primitive/feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions