Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should <dir> behave like a list element? #9296

Open
annevk opened this issue May 15, 2023 · 6 comments
Open

Should <dir> behave like a list element? #9296

annevk opened this issue May 15, 2023 · 6 comments
Labels
a11y-tracker Group bringing to attention of a11y, or tracked by the a11y Group but not needing response. accessibility Affects accessibility interop Implementations are not interoperable with each other topic: rendering

Comments

@annevk
Copy link
Member

annevk commented May 15, 2023

Only Gecko seems to render http://software.hixie.ch/utilities/js/live-dom-viewer/?%3Cdir%3E%3Cli%3Etest%3Cdir%3E%3Cli%3Etest as HTML asks for.

That makes me think that at this point it's probably more web compatible to not do that.

https://w3c.github.io/html-aam/ also doesn't map it to role=list it seems.

cc @zcorpan @mfreed7

@annevk annevk added topic: rendering interop Implementations are not interoperable with each other labels May 15, 2023
@Yay295
Copy link
Contributor

Yay295 commented May 15, 2023

https://w3c.github.io/html-aam/ also doesn't map it to role=list it seems.

That page doesn't seem to mention the <dir> element at all.

@scottaohara
Copy link
Collaborator

Deprecated/obsolete features aren't listed in HTML AAM. In this case, the element was deprecated/made obsolete years before AAM was created. I could add those into the spec, but with rare exceptions like the dir element (where it says it should be treated like a UL, so it should be mapped to role=list), many of these features will have no useful mappings for accessibility.

@nt1m
Copy link
Member

nt1m commented May 15, 2023

@Ahmad-S792 recently made the rendering match the spec / Firefox in WebKit/WebKit@5febb62

@zcorpan
Copy link
Member

zcorpan commented May 15, 2023

The visual impact of alternating the marker for nested lists is likely inconsequential since dir is rarely used and nested and unstyled dir is likely extremely rare.

Running a query of 1% of httparchive I found 7 pages using dir (so ~0.005% of pages, which is similar to ~0.007% in Web Almanac 2022), for example this one uses it in the sidebar menu without author styles (no nested dirs): http://www.americantoymarbles.com/

Mapping to role=list seems like it would be an improvement for this page at least. WebKit has heuristics for ul, which I suppose could apply equally to dir.

Query

Total number of pages is 12,890,459; this runs on a 1% sample subset.

SELECT
  *
FROM (
  SELECT
    page,
    ARRAY_LENGTH(REGEXP_EXTRACT_ALL(body, r'(?i)(<dir(?:\s|>))')) AS dir_count
  FROM
    `httparchive.response_bodies.2023_04_01_desktop` TABLESAMPLE SYSTEM (1 PERCENT)
  WHERE
    page = url )
WHERE
  dir_count > 0
  ORDER BY dir_count DESC

Result

page,dir_count
http://www.americantoymarbles.com/,5
http://poemasguay.blogspot.com/,2
http://www.1960sflashback.com/,2
http://www.saikaleshwaritravels.com/,1
http://wtcbarcelonaevents.com/,1
http://www.evlm.stuba.sk/,1
https://holzteilchen.de/,1

@annevk annevk added accessibility Affects accessibility a11y-tracker Group bringing to attention of a11y, or tracked by the a11y Group but not needing response. labels May 15, 2023
@annevk
Copy link
Member Author

annevk commented May 15, 2023

I guess I don't care strongly which way this goes. Aligning everything with the HTML Standard, including HTML AAM, works too.

@zcorpan
Copy link
Member

zcorpan commented May 15, 2023

Filed w3c/html-aam#486

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y-tracker Group bringing to attention of a11y, or tracked by the a11y Group but not needing response. accessibility Affects accessibility interop Implementations are not interoperable with each other topic: rendering
Development

No branches or pull requests

5 participants