#50449 closed defect (bug) (fixed)
Sitemap style for RTL sites
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Sitemaps | Keywords: | has-screenshots has-patch commit |
Focuses: | rtl | Cc: |
Description
There is a style for
#sitemap__table tr th {text-align: left;}
even though I put my site in RTL mode, which at first glance seems wrong, but when we were building Twenty Twenty, I asked a RTL native user to test and he said that URLs should always be LTR. So maybe the table heading is correct and the rest of the table needs direction: ltr
.
Please ask someone to test in a RTL language.
Attachments (6)
Change History (24)
#1
in reply to:
↑ description
;
follow-up:
↓ 7
@
5 years ago
- Focuses rtl added
Replying to joyously:
when we were building Twenty Twenty, I asked a RTL native user to test and he said that URLs should always be LTR. So maybe the table heading is correct and the rest of the table needs
direction: ltr
.
URLs should indeed be displayed in LTR per #16834 and #49949, but I think that only applies to UI.
Not sure if this also applies to machine-readable content like sitemaps. Adding rtl
focus so that native RTL users could chime in.
#2
@
5 years ago
- Keywords has-screenshots added
sitemap-rtl.png is a proposed change to how the sitemaps should be rendered for RTL languages.
It was generated with a patch I have locally. Want to make sure that's the correct behavior before uploading the patch.
Note that the Last Modified
column was added via a plugin, and is there to test the alignment of any non-URL columns.
#3
@
5 years ago
Related question: I notice that WP_MS_Sites_List_Table
does not left-align the "URL" column. Should it?
What is displayed in that column is not a "full" URL (i.e., doesn't display the URL schema/protocol), so maybe that's why it doesn't. Just asking...
#5
@
5 years ago
- Keywords has-patch added; needs-patch removed
50449.2.diff modifies the CSS so that:
- the text direction and alignment of the URL column (both header and body) is always
ltr
andleft
- all other column headers are aligned based on
is_rtl()
(to override browser defaults to center column headers)- the text direction of these columns (both header and body) is already determined by the
dir
attribute on thehtml
element
- the text direction of these columns (both header and body) is already determined by the
#6
@
5 years ago
When handling RTL URL's - mixed RTL/LTR URLs need be considered.
The domain (as well as scheme/protocol) is LTR, while some of the slugs can be RTL. So URL strings must be LTR for readability. However the URL cells alignment can be RTL.
I have a personal preference for the cells being LTR (as per sitemaps-rtl.png above - having the http://example.com align helps readability). But RTL is also common (as per wp-ms-sites-list-table-rtl.png), and I believe this is the current standard for most RLT interfaces (gmail, browsers, etc.). ie. even if a column's strings are LTR, the cells and column will be aligned RTL.
As for that column header's direction - I think consistency with the rest of the headers (RTL) is the way to go, even if the column cells end up aligned to the left. Especially if the latin-charactered "URL" header will get translated to an actual word. Having an RTL word aligned to the left is weird.
#7
in reply to:
↑ 1
@
5 years ago
Replying to SergeyBiryukov:
Replying to joyously:
when we were building Twenty Twenty, I asked a RTL native user to test and he said that URLs should always be LTR. So maybe the table heading is correct and the rest of the table needs
direction: ltr
.
URLs should indeed be displayed in LTR per #16834 and #49949, but I think that only applies to UI.
Not sure if this also applies to machine-readable content like sitemaps. Adding
rtl
focus so that native RTL users could chime in.
As mentioned in the linked tickets, the URL should be always displayed in LTR, both in LRT and RTL languages. This applies on sitemap too as the sitemap is not only machine-readable, humans use sitemaps too.
#8
follow-up:
↓ 11
@
5 years ago
- Keywords needs-testing added
@ramiy Could you perhaps test 50449.2.diff and provide feedback?
This ticket was mentioned in Slack in #core-sitemaps by swissspidy. View the logs.
5 years ago
This ticket was mentioned in Slack in #core by pbiron. View the logs.
5 years ago
#11
in reply to:
↑ 8
@
5 years ago
- Keywords needs-testing removed
Replying to swissspidy:
@ramiy Could you perhaps test 50449.2.diff and provide feedback?
RTL tested. Not good. the th
is aligned to left, should be aligned to right.
This ticket was mentioned in Slack in #core-sitemaps by ramiy. View the logs.
5 years ago
#14
follow-up:
↓ 15
@
5 years ago
50449.4.diff produces the same results as 50449.3.diff but with simpler CSS.
@ramiy can you please verify?
#15
in reply to:
↑ 14
@
5 years ago
Replying to pbiron:
50449.4.diff produces the same results as 50449.3.diff but with simpler CSS.
@ramiy can you please verify?
Tested. Looks good!
Sitemap in RTL mode. (My browser default color is yellow.)