- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Thu, 13 Jun 2024 09:19:38 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[css-display-4] Define how reading-order / reading-order-items interact with focusable display: contents elements.`, and agreed to the following: * `RESOLVED: reading-flow does not affect whether an element is focusable` <details><summary>The full IRC log of that discussion</summary> <bramus> rachelandrew: issue around how our new reading-flow property interacts with focusable display: contents elements<br> <bramus> … got input from mason and di in the issue<br> <bramus> … question is from di at the bottom<br> <bramus> … should a display: contents with ?? be considered reading order items?<br> <bramus> … di also suggested that display: contents elements really arent focusable<br> <bramus> … can make it so that display: contents children are not reading order focusable<br> <bramus> … would love to hear thoughts<br> <bramus> dbaron: there are a bunch of complicated issues here<br> <bramus> … because on the one hand weve gotten feedback from a11y folks tha focusability and ?? should match each other<br> <bramus> … you shouldnt be able to do sth that takes an item out of fcous order but not the a11y tree<br> <bramus> … things like that<br> <astearns> s/??/reading order/<br> <bramus> … when you are saying that reading order should depend on box order it doesnt make sense to go through a thing that doenst generate boxes<br> <iank_> q+<br> <bramus> … easy way out is to say that if you are using one of the readingflow values that depend on box order that elements with display: contents are not part of that order, ie not focusable<br> <bramus> … not ideal from a11y POV i think<br> <bramus> … I have an almost finished project to make elements with display: contents focusable but hasnt happened yet<br> <bramus> … pulling that back would be a partial reverse of the change to make display: contents focusable<br> <bramus> … alt is to come up with some rule that says where it goes in the order<br> <bramus> … not hard to make that rule, might be hard to impl<br> <bramus> … doing the right thing for a11y vs doing a thing that is implementable/describable<br> <bramus> astearns: is your change that the element with display: contents is focusable or that its children are focusable?<br> <bramus> dbaron: the element<br> <astearns> ack iank_<br> <iank_> ```<br> <iank_> <div style="display: contents;"><br> <iank_> <div>1</div><br> <iank_> <div style="order: 5;">2</div><br> <iank_> </div><br> <iank_> <div>3</div><br> <iank_> ```<br> <bramus> iank_: there’s a case that i pasted here in irc<br> <bramus> … with the order prop and grid/flex reordering things you can pull items bc display: contents doestn have a box you can pull out of the display: contents and the iteration order doesnt become clear<br> <bramus> … in this case here, the order would be 1 3 2<br> <bramus> but display: contents is wrapping 1 and 2<br> <bramus> … so maybe we shouldnt consider display: contents<br> <bramus> … there might be other solutions<br> <astearns> ack fantasai<br> <bramus> fantasai: def an awkward situation. if author asks for it to be focusable then we should try to<br> <bramus> … would mean to figure out a place to put it in the order<br> <bramus> … before any other items it contains would make sense<br> <bramus> … even if they are split across multiple places<br> <florian> q+<br> <bramus> dbaron: to poke some holes into that<br> <bramus> … 2 edge cases<br> <bramus> … 1 of them is the item has no children at all and therefore ther eis no box at all<br> <bramus> … other thing is that child is also display: contents<br> <bramus> … no children at all is messy<br> <bramus> … other thing leads to recursion<br> <bramus> fantasai: no contents: if we were reordering all the items and ?? between prev and next siblings<br> <bramus> … if we reorder those then we could give up and shove it up the end<br> <bramus> … not sure what authors would expect<br> <bramus> … between the two makes sens<br> <astearns> ack florian<br> <bramus> … we might fix either attach to the prev or attach to the next as a sort of option so that at least when they are together it lands in the middle<br> <bkardell_> s/sens/sense<br> <bramus> florian: can i suggest to go the opposite route and say that display: contents does not apply to focusable elements?<br> <bramus> fantasai: interesting<br> <bramus> TabAtkins: that would break specs though … the TOC in it for example<br> <bramus> florian: but does it need to be focusable?<br> <bramus> TabAtkins: you can tab into the children spans<br> <bramus> fantasai: ????<br> <bramus> TabAtkins: if you prevent focusable elements from becoming display: contents then it would break ?????<br> <bramus> florian: but the a is<br> <bramus> TabAtkins: this is a focusable <a><br> <bkardell_> q+<br> <bramus> … the fact that its used in a TOC for spec suggests that ???<br> <bramus> kbabbitt: is it actually focusable?<br> <astearns> s/kbabbitt/bkardell_/<br> <bramus> TabAtkins: it does not. what lforian said is to prevent focusable elements from becoming display: contents<br> <bramus> bkardell_: a is focusable if it has an href<br> <bramus> TabAtkins: it does, wouldnt use a otherwise<br> <bramus> florian: you mean that every entry in it is an a?<br> <bramus> TabAtkins: yes, but i am positioning in the grid the contents of it<br> <astearns> ack bkardell_<br> <bramus> florian: to keep pushing … tab’s case is an important point but its a subset<br> <bramus> … if we had ::contents the bit that needs to be focusable is that<br> <bramus> … you dont have element with a bunch of children that might or not be focusable<br> <bramus> … you want to layout the ::before and ::after<br> <bramus> … the part that is focusable is everything except those<br> <bramus> … seems a subcase of I have a focusable element with stuff underneath<br> <bramus> … seems that this case is less ? than the whole problem space<br> <bramus> TabAtkins: was using this as an example to counter your request<br> <bramus> florian: yes, but I think its a subcase<br> <emilio> I think this is a huge tangent, I don't think we should make display: contents not work like that<br> <bramus> TabAtkins: correct solution here is to use subgrid here. there are other solutions here<br> <emilio> We either do what we do now (display: contents makes stuff not focusable), or make display: contents focusable and deal with it<br> <bramus> astearns: given that we cant change other behaviors, what should we do here?<br> <bramus> florian: for this case: kind of has an obv answer.<br> <astearns> s/that/the likelihood that/<br> <bramus> … it is effectively everything except before and after that remains focusable<br> <bkardell_> q+ for miriam<br> <bkardell_> q+ miriam<br> <bkardell_> q-<br> <emilio> q+<br> <bramus> … which I think is different from situation where you have a bunch of child elements and then you cant place those<br> <bramus> rachelandrew: I feel like if in the situation where the author has asked to make it focusable then we have to honor that<br> <bramus> … the default propably is that its not focusable<br> <bramus> … its a visual hting we are doing with reading-flow<br> <bramus> … general use case gonna be that ???<br> <bramus> … if people asked to make the box focusable then we need to consider some of elika’s suggestions<br> <bramus> florian: or go back to my other suggestion. if you set tabindex on display: contents then you cant<br> <lwarlow> q+<br> <bramus> s/if you set tabindex on display: contents then you cant/if you set tabindex on then display: contents does not apply<br> <florian> q+<br> <astearns> ack miriam<br> <bramus> miriam: currently a11y experts have said us not to use display: contents bc browser bugs and regressions<br> <bramus> … not reliable to use display: contents on anything that needs semantics<br> <astearns> ack emilio<br> <bramus> … sara soueidan recently mentioned it again at css day<br> <bramus> emilio: we should stop discussion making display: contents not work on focusable things<br> <bramus> … i think it would be super confusing to do<br> <bramus> … can decied that display: contents elems are not focusable<br> <bramus> … not a big deal i think, but opinions<br> <astearns> q+<br> <bramus> … or can deal with reading order ??<br> <florian> q-<br> <bramus> … cant overfocus on one case specifically (e.g. tabs example)<br> <astearns> ack dbaron<br> <bramus> dbaron: rachel suggested to (IUC) sort of make setting tabindex be a stronger indication of focusability that would override some other things that make it non focusable<br> <bramus> … this scares me bc the rules are already very complicated<br> <bramus> … an overriding layer seems like a huge mess<br> <astearns> ack lwarlow<br> <bramus> lwarlow: i dont fully understand the problem<br> <bramus> … display: contents is used a lot with shadow dom<br> <bramus> … largely due to other issues with shadow root<br> <bramus> … suggestion of making the children of display: contents dont work with reading order feels strange<br> <bramus> … my intuition would be to ignore display: contents and treat it as if those children were where that display: contents element is<br> <bramus> … ??? even if source order doesnt match that<br> <bramus> … so making display: contents focusable here seems like wrong thing<br> <bramus> emilio: I thought idea was to make display: contents element not focusable / reachable by tab<br> <bramus> … but maybe I misunderstood<br> <bramus> dbaron: thats what i was thinking at least<br> <bramus> … agreeing with emilio here<br> <florian> q?<br> <bramus> emilio: so basically it would work but we wouldnt be able to ??? an element that would be ??? if you are reading visual order<br> <emilio> s/???/reach by tab/<br> <bramus> rachelandrew: i think that was the orig thinking. to not focus an element if you were doing that<br> <emilio> s/???/display: contents/<br> <florian> q?<br> <florian> q+<br> <bramus> … its whether that causes a problem here if we have unfocusable display: contents elems<br> <bramus> astearns: i think im confused<br> <bramus> … suggestion to do a copout but to have a principle that what we do with reading=flow and display: contents should be same as what we do with focusabilyt and display: contents<br> <astearns> ack astearns<br> <bramus> … not sure if that is actually desirable given the last few comments<br> <astearns> ack fantasai<br> <florian> q-<br> <bramus> fantasai: would be unexpected if lets say you have flexbox and use display: contents on some child and on some other item you set order: -1 and then you set reading-flow<br> <bramus> … even if you didnt do any reordering, the display: contents elem in the middle would disappear from the tab order<br> <bramus> … would be unexpected<br> <bramus> … and probably not notice dby many, so probably shouldnt do<br> <emilio> q+<br> <florian> q+<br> <bramus> … elems should remain focusable<br> <bramus> … best to put it before the first item that uses it<br> <bramus> … best place if it had no children attach to element before or after or both if ????<br> <bramus> … if youve to a working layout without reading order then it shouldnt break<br> <astearns> ack emilio<br> <bramus> emilio: slight counterpiont: if you make display: contents elem focusable. any visual feedback … you would already need to be careful with its styles, e.g. a link with an outline … youd have to style descendant or something<br> <bramus> … less concerned about authors accidentally removing it from tab order<br> <lwarlow> q+<br> <bramus> … its unfortunate but its a can of worms<br> <miriam> browser issues documented: https://adrianroselli.com/2022/07/its-mid-2022-and-browsers-mostly-safari-still-break-accessibility-via-display-properties.html<br> <bramus> … personal preference to make display: contents not focusable<br> <bramus> … but i get it<br> <astearns> ack florian<br> <miriam> and current state noted on caniuse: https://caniuse.com/css-display-contents<br> <bramus> florian: maybe thats just me, but i think we are talking in the abstract and maybe therefore cant find the right thing to do. need usecases and think on the basis of what people are actually doing with display: contents<br> <miriam> seems buttons are the primary remaining issue in most browsers<br> <bramus> … we are going in circles i thikn<br> <bramus> fantasai: if its focusabl ein the middle of the list wihtout reading order items and then applying it makes it no longer focusable … seems wrong<br> <bramus> florian: i agree in principle but we should know what people are doing with it<br> <bramus> … we know of tabs cases here but what everyone is doing here<br> <bramus> fantasai: ???<br> <emilio> q++<br> <emilio> q- +<br> <emilio> q+<br> <bramus> florian: agree. just confused by combinatin of statement by a11y people saying dont do it and us doing ???<br> <bramus> fantasai: (missed)<br> <fantasai> s/???/if I have a flexbox and it contains an item with 'display: contents' that's focusable and it is reachable now, and all I do is flip reading-flow on the flexbox, that *should not change the focusability of its children*/<br> <bramus> astearns: this is getting heated … emilio wanted to reply?<br> <astearns> ack emilio<br> <bramus> emilio: swithcing reading order wihtout display: contents can change to top order with shadow dom in various ways<br> <astearns> s/heated/more heated than it needs to be/<br> <bramus> … maybe that expectation is already broken? bc of how shadow dom tab scoping order works<br> <bramus> fantasai: there is a difference in changing the order making it not tabbable<br> <bramus> emilio: thats fair<br> <bramus> lwarlow: 100% agree with elika<br> <bramus> … cant change unrelated element and then suddenly make it no longer focusable<br> <florian> s/us doing ???/us figuring out what happens if you do it, without considering why people are doing it<br> <bramus> … changing tab order is what you expect<br> <bramus> … not focusable is not<br> <emilio> q-<br> <bramus> … not durable<br> <astearns> ackl lwarlow<br> <emilio> ack lwarlow<br> <bramus> … important to understand use cases, but tangent to this problem<br> <astearns> s/durable/doable/<br> <bramus> … you may not even know if you have a display: contents child<br> <bramus> … it should still be focusable<br> <bramus> … if you are using a web component from somewhere else, you have no control over it<br> <bramus> … i dont think we can make it suddenly not work<br> <bramus> … also "don’t use display: contents"<br> <TabAtkins> in retrospect it's kinda a fundamentally bad idea, tbf<br> <bramus> … reason for that is that its historically broken in browsers, not that its a bad idea<br> <florian> q+<br> <chrishtr> q+<br> <bramus> … cant disregard whole usecase because historical issues<br> <miriam> [nods]<br> <bramus> astearns: can maybe resolve on that reading flow should have no effect on focusability<br> <astearns> ack dbaron<br> <florian> q- later<br> <bramus> dbaron: regarding fantasai’s example: example 1st and 2nd time was slightly different<br> <bramus> …the 1st time it was setting order, 2nd time reading-flow<br> <fantasai> 1st example: flexbox containing e.g. 5 items, with 3rd item `display: contents` element, and last item with `order: -1`<br> <bramus> … what i was suggesting for if we need a condition for when these things might not be focusable, it would be only for use of reading-flow not order, rather than both<br> <fantasai> 2nd example: flexbox containing an item with `display: contents` and no use of reordering<br> <bramus> … there is a distinction between both<br> <florian> qq+<br> <bramus> … other thing: what luke already said: i think what we are trying to do here is fix the reasons why a11y folks are saying not to use this stuff<br> <florian> q-<br> <bramus> … bc people have use cases. only thing is that a11y folks say its currently broken<br> <bramus> chrishtr: concrete example from mason (2nd comment int he issue) display: contents elme with tabindex with 2 children<br> <bramus> … difficulty stems from conflict of values of order and tabindex of parent<br> <bramus> … not sure why this problem is specific to display: contents<br> <bramus> … wouldnt a parent with tabindex and order children cause problems even if parent was not display: contents<br> <bramus> lwarlow: order property woulnd taffect thme<br> <bramus> chrishtr: only ????<br> <bramus> lwarlow: thats my understanding<br> <bramus> dbaron: issue with masons thing is that ?? is reordering its grandchildren because it has display: contents<br> <bramus> chrishtr: could we resolve by causing display: contents to act like some kind of order affecting stacking content group (?)<br> <kizu> q+<br> <bramus> … could have a display: contents cause a flex item children to all have continous ordering<br> <astearns> ack chrishtr<br> <bramus> dbaron: thats probably not a compat problem I guess<br> <bramus> iank_: doesnt work for grid bc you can place grid items in any row/col<br> <dbaron> s/not a/a/<br> <bramus> chrishtr: do you have an exmaple?<br> <bramus> TabAtkins: notion of keeping them together as a group. in grid each item is individually placed<br> <bramus> chrishtr: but you can specify order on grid children, right?<br> <florian> q+<br> <bkardell_> s/exmaple/example<br> <bramus> … suggestion to reinterpret order for children of display: contents elements<br> <bramus> TabAtkins: nesting their order?<br> <bramus> chrishtr: yes<br> <bramus> iank_: would be surprising to authors<br> <bramus> … bc it wouldnt read in that order anymore<br> <bramus> astearns: i think we are going to have to wrap up<br> <astearns> ack florian<br> <bramus> florian: unless i misunderstood, chris has an interesting thing to focusalbe children of a display: contents elem<br> <bramus> … IUC thats not what your proposal adddresses<br> <bramus> … can be intersting, but doesnt solve this problem<br> <bramus> chrishtr: maybe I misunderstood mason’s example<br> <bramus> dbaron: I think its not that you have to go in and out, but its not clear where to put the parent in the tab order<br> <bramus> kizu: from a11y POV this case is violation. you cant have interactive elements nested inside other interactive ones<br> <bramus> … for when display: contents we should use focsable<br> <bramus> … maybe we can split focusable area into multiple ones?<br> <bramus> … if we have button with some interactiveelement inside, we split all the text parts around it into two ??? and then split<br> <florian> +1 to kizu<br> <bramus> … this way whatever we do, order would be logical from author POV<br> <bramus> … focus button, then text, then ???, then 2nd textnode<br> <astearns> ack kizu<br> <bramus> … when we consider all consecutive non interactive parts of display: contents as separate focusable areas we can mix with other interactive elements inside<br> <bramus> … with this solution wec an solve reading order and bigger issue with nested elements<br> <astearns> ack dbaron<br> <bramus> dbaron: my concern with that is that focus state is something that is in the DOM<br> <bramus> … given that focus is a thing associated with an element, its not clear how you make clear that an item appears 2 times int he tabbing order<br> <bramus> kizu: i think it would work, same as when you click<br> <bramus> … ???<br> <florian> q+<br> <astearns> zakim, close queue<br> <Zakim> ok, astearns, the speaker queue is closed<br> <bramus> … authors dont want to know which part you clicked, only that you clicked the element<br> <bramus> … order of things … focus on the text, then inner, then parent again<br> <bramus> … could be confusing for authors but preserves a11y<br> <dbaron> (I disagree, but I should probably let other people talk.)<br> <astearns> ack chrishtr<br> <kizu> I will comment in the issue<br> <bramus> chrishtr: 2 points: would be super helpful if you could write that down explicitly<br> <bramus> … and then walking through that in detail would be helpful when we come back to this issues<br> <bramus> … if this is an anti-pattern then we need a good thing for readers to get to the content eventually<br> <astearns> ack florian<br> <bramus> … would love to learn more too about why this is an anti-pattern<br> <bramus> florian: I like kizu’s suggestion<br> <bramus> … html spec distinguishes focusable element vs focusable area<br> <bkardell_> q+<br> <bramus> … the area can be an elemenent or part of an element<br> <bramus> … so there is already a notion of this in the HTML spec<br> <bramus> … should explore kizu’s idea<br> <bramus> bkardell_: want to warn about confalting interactive element with tabindex<br> <bramus> … should be careful about that<br> <bramus> astearns: so we should take it back to the issue?<br> <bramus> rachelandrew: so we all believe that ?? should be focusable?<br> <bramus> florian: maybe can resolve on regardless of what and how that reading-flow doesnt change that<br> <bramus> fantasai: thats what rachel is syaing<br> <fantasai> s/??/items with `display: contents`<br> <bkardell_> s/… should be careful about that/They aren't really interchangeable. There are complex interactive elements that do nest tab indexes and that's expected.<br> <bramus> florian: i think we are saying the same thing, but wanted to express that in a way we dont block romans thing<br> <bramus> bkardell_: can agree … and can also agree to make display: contents eventually focusable<br> <bramus> astearns: but thats a separate issue<br> <bramus> … shadow dom and at least a bunch of other things<br> <emilio> reading flow should not make elements not reachable in the tab order or something?<br> <bramus> … eg fragmentation, formatting context, …<br> <bramus> … would like to scope this to only effect of reading-flow<br> <bramus> chrishtr: did we prev resolve to make display: contents focusable?<br> <fantasai> PROPOSED: reading-flow does not affect whether an element with `display: contents` is focusable<br> <bramus> dbaron: dont remember off the top of my head<br> <lwarlow> +1<br> <bramus> astearns: we have proposed resolution<br> <dbaron> dbaron: ... which discussions were in CSS and which were in WHATWG<br> <bramus> … maybe that is too specific?<br> <bramus> … maybe “reading-flow does not affect whether an element is focusable”<br> <fantasai> PROPOSED: reading-flow does not affect whether an element is focusable<br> <bramus> florian: both work for me<br> <lwarlow> +1<br> <fantasai> +1<br> <bramus> astearns: objections?<br> <bramus> RESOLVED: reading-flow does not affect whether an element is focusable<br> <bramus> astearns: please keep commenting on the issue and put real world examples<br> <bramus> … will come back to this later<br> <fantasai> scribenick: fantasai<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9230#issuecomment-2165098385 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 13 June 2024 09:19:40 UTC