Skip to content

Should dir=auto with no strong characters inherit directionality from parent or be ltr? #10097

@dbaron

Description

@dbaron

What is the issue with the HTML Standard?

The HTML spec has for a while (at least since sometime before the refactoring in #9554) said that, in the cases where dir=auto determines directionality from the text content of an element (as opposed to the cases where it looks at form control values as it does for text inputs and textarea), the element inherits directionality from the parent when the text content does not have strong characters ("a code point whose bidirectional character type is L, AL, or R"). (See spec.)

For a long time no implementations did this. As part of recent directionality changes I shipped this behavior in Chrome 120. (See the CL that made the change.) This CL changed one WPT which still fails in Safari and Firefox.

We recently got a bug report about this behavior, with a description of a case that it broke.

My question is: do we want to revert this behavior in Chrome and change the HTML spec back to the old browser behavior? Or is what the HTML spec previously described considered the desirable behavior?

cc @fantasai @r12a

Metadata

Metadata

Assignees

No one assigned

    Labels

    i18n-alreqNotifies Arabic script experts of relevant issuesi18n-hlreqNotifies Hebrew script experts of relevant issuesi18n-trackerGroup bringing to attention of Internationalization, or tracked by i18n but not needing response.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions