Open cookiecrook opened 8 months ago
I think Bryan's summary was that inlines would concat without space.
<span>foo</span><span>bar</span>
= "foobar"
<span>foo</span> <span>bar</span>
= "foo bar" (interior space between inline elements meaningful)
and "block-like" values (pretty much every display value besides inline
) would be joined with a space, even if only one of the adjacent ~nodes was non-inline.
<div>foo</div><span>bar</span>
= "foo bar"
Bryan's thought was this also applies to pseudo elements, but the interior extra concatenated space is only used if both the pseudo and its element are display:inline
or equivalent.
Again, I'm not yet sure if this is implementable, and there are a number of other open questions...
If the solution gets complicated enough, such as a table listing all the CSS display values (or other properties for that matter) and how they affect Accessibility API related mappings, then there might be a need to revisit the idea of a CSS-AAM spec.
CSS's most current definition of how to most correctly convert to plaintext is here btw: https://www.w3.org/TR/css-text-4/#plaintext Note that if you're not in an inline formatting context, collapsible whitespace sequences get collapsed away. (I would add an expectation that generated content via ::before/::after/::marker would be included in the conversion.)
Thanks @fantasai... that and the cross-referenced section, CSS Text: 4.3.1. Phase I: Collapsing and Transformation, seem like the most promising path forward.
Discussed in today's meeting: https://www.w3.org/2024/02/01-aria-minutes.html#t05
From another PR that I'm mostly gutting due to merge conflicts and an inability to land on consensus in time for the looming AccName CR.
Presumably the interior contents would be promoted for "adjacency" consideration?
_Originally posted by @cookiecrook in https://github.com/w3c/accname/pull/168#discussion_r1458058588_