WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.39k stars 4.15k forks source link

Skip link in wrong position with RTL language #31377

Open Sandstromer opened 3 years ago

Sandstromer commented 3 years ago

Description

When using a RTL language, the skip link button/link is positioned at the top left of the browser window.

Step-by-step reproduction instructions

With a FSE theme active or a classic theme without its own skip link function. Change site language to a RTL language. View front-end and tab to bring up the skip link.

Expected behaviour

The skip link should be positioned at the top right.

Actual behaviour

The skip link is positioned at the top left, in the same position as a non-RTL language.

Screenshots or screen recording (optional)

Code snippet (optional)

WordPress information

Device information

annezazu commented 3 years ago

@Sandstromer thanks for reporting this! Are you able to share a screenshot or an example of a block theme to test this with?

Sandstromer commented 3 years ago

Theme: TT1-Blocks

LTR

gutenberg-skip-link

RTL

gutenberg-skip-link-rtl

.skip-link.screen-reader-text:focus has absolute positioning of 5px from the left.

It looks like we are just missing the rtl styling to position the skip-link to the right.

annezazu commented 3 years ago

Ah ha! Thank you so much. I'll update the labels appropriately.