Re: [csswg-drafts] [css-grid] Masonry layout in CSS Grid 3 has potential to cause accessibility problems with reading order. (#5675)

The CSS Working Group just discussed `[css-grid] Masonry layout in CSS Grid 3 has potential to cause accessibility problems with reading order.`, and agreed to the following:

* `RESOLVED Masonry reading order operates more like grid than flex`
* `RESOLVED: Masonry reading order operates more like grid than flex`

<details><summary>The full IRC log of that discussion</summary>
&lt;kbabbitt> rachelandrew: this is an issue raised before we started talking about reading-flow<br>
&lt;kbabbitt> ... in ~2020<br>
&lt;kbabbitt> ... this is something we intend to solve with reading-flow<br>
&lt;kbabbitt> ... really the issue is around what the default behavior is for masonry with regard to reading flow<br>
&lt;kbabbitt> ... bunch of discussion in the issue<br>
&lt;kbabbitt> ... we discussed in other issues that we probably wnat some default reading-flow behavior in masory<br>
&lt;kbabbitt> ... what should that be?<br>
&lt;kbabbitt> ... keyword values probably are tied to how we decide to do masonry<br>
&lt;kbabbitt> ... whether it's part of grid or not<br>
&lt;kbabbitt> ... discussion is, do we want that default behavior<br>
&lt;kbabbitt> ... so that we use reading-flow and follow the visual by default<br>
&lt;kbabbitt> .. I think that's how this is solved<br>
&lt;kbabbitt> ... issue itself predates all that discussion<br>
&lt;kbabbitt> astearns: have questions about what visual order for masonry would be<br>
&lt;bkardell> I wish we could go back and make the visual order work in grid by default<br>
&lt;kbabbitt> rachelandrew: in my comment, my point was we broke it donw<br>
&lt;TabAtkins> Looking in the latest comments of the issue, I do think masonry is much more grid-like in this aspect than flex-like<br>
&lt;bkardell> s/donw/down<br>
&lt;rachelandrew> https://github.com/w3c/csswg-drafts/issues/5675#issuecomment-2565155995<br>
&lt;kbabbitt> rachelandrew: issue there is whether we think masonry is more like grid or more like flexbox<br>
&lt;kbabbitt> ... opposite model in reading-flow<br>
&lt;kbabbitt> TabAtkins: I believe masonry should be thought of more like grid than flexbox<br>
&lt;kbabbitt> ... flexbox going in reverse direction can be because you're laying out buttons on other side<br>
&lt;kbabbitt> ... i.e. outward to inward<br>
&lt;kbabbitt> ... doesn't apply in masonry<br>
&lt;kbabbitt> .<br>
&lt;kbabbitt> .. going to read in visual order regardleses of how we flow it<br>
&lt;kbabbitt> rachelandrew: makes sense<br>
&lt;kbabbitt> astearns: the idea of using item tolerance as a measure for which row to assume an item is in makes some sense<br>
&lt;kbabbitt> TabAtkins: we can almost just use the source order except for explicitly placed items<br>
&lt;kbabbitt> ... have to reinterpret that if we're doing visual flow<br>
&lt;kbabbitt> ... having to use item-tolerance in the same way as ? is correct way to go<br>
&lt;kbabbitt> ... if you explicitly place first item in column 4, then auto flow a bunnch of items<br>
&lt;kbabbitt> ... pure source order will read item in column 4 first then others<br>
&lt;kbabbitt> ... but that's roughly visual order anyway<br>
&lt;kbabbitt> ... visual order would want to reinterpret things<br>
&lt;kbabbitt> ... so item in column 4 is read 4th<br>
&lt;kbabbitt> ... use item tolerance to tell when something is next or following row<br>
&lt;kbabbitt> fantasai: if that 4th item is your righ thand sidebar read that first?<br>
&lt;kbabbitt> ... which makes me wonder if we should have a mode that allows reordering of auto placed items<br>
&lt;kbabbitt> ... but leaves explicitly placed items where they are<br>
&lt;kbabbitt> TabAtkins: if you use order property alongside you get that<br>
&lt;kbabbitt> fantasai: for some of these cases<br>
&lt;fantasai> scribe+<br>
&lt;fantasai> TabAtkins: My proposal is that masonry, whether we do this by grid values or making new masonry values, but use something like grid-modified order<br>
&lt;fantasai> TabAtkins: and one that's visual, which is auto-flow taken into account<br>
&lt;fantasai> TabAtkins: If you have things you've explicitly placed but should be read first, order-modified grid order works<br>
&lt;rachelandrew> q+<br>
&lt;fantasai> TabAtkins: For auto-placed items, natural masonry flow already gives a reasonable analog to desired reading order<br>
&lt;fantasai> fantasai: It depends on your spanning stuff<br>
&lt;fantasai> TabAtkins: when using explicit placement for layout reasons, e.g. sidebar and main area<br>
&lt;fantasai> TabAtkins: the 'visual' value would read them left to right, using item-tolerance to decide when something is in the next "row" or whateer<br>
&lt;astearns> ack rachelandrew<br>
&lt;kbabbitt> fantasai: I can never keep track of reading-flow values<br>
&lt;kbabbitt> rachelandrew: not convinced that source order value will always be ok<br>
&lt;kbabbitt> ... examples I've seen have inserted a very large item<br>
&lt;kbabbitt> .. which is likely to cause weird jumping around<br>
&lt;kbabbitt> ... even if source order is roughly correct<br>
&lt;kbabbitt> ... granted this is on experimental masonry<br>
&lt;kbabbitt> ... maybe in practice this isn't such a problem<br>
&lt;kbabbitt> ... but reasonably large items could force things into strange layout<br>
&lt;kbabbitt> ...that's what the OP of this issue had in mind<br>
&lt;kbabbitt> ... the idea that you could have slightly odd ordering because of a large item<br>
&lt;kbabbitt> TabAtkins: OP has very first etxample of a masonry not laid out in masonry order<br>
&lt;kbabbitt> astearns: it's an example of some reordering htat masonry can do<br>
&lt;kbabbitt> rachelandrew: don't know what order they were using<br>
&lt;kbabbitt> fantasai: there have been suggestions to be able to have named tracks<br>
&lt;kbabbitt> ... e.g. every other track has a name<br>
&lt;kbabbitt> .. use auto placement in combination with a namer<br>
&lt;kbabbitt> ... we have talked about for grid and masonry where you can say I want to auto place but only in B-style tracks<br>
&lt;kbabbitt> ... could result in a layout like this<br>
&lt;kbabbitt> rachelandrew: would be good to account for that kind of thing<br>
&lt;kbabbitt> ... e.g. I can see how just having large size items could cause jumping about with just source order<br>
&lt;kbabbitt> TabAtkins: would like to see an example with large item in correct masonry layout to see effects<br>
&lt;kbabbitt> ... if you're setting things inmaronry to explicit column sthings can get wawy off<br>
&lt;kbabbitt> ... but that's something you're doing explicitly<br>
&lt;kbabbitt> ... don't do that. or do with order to compensate<br>
&lt;fantasai> https://www.w3.org/TR/css-grid-3/#order-accessibility<br>
&lt;astearns> q+<br>
&lt;kbabbitt> ... in starndard case of masonry with reasonable tolerance and explicit placement which is not smeantically important<br>
&lt;kbabbitt> ... then order from masonry layout gives you the best you can automatically doi<br>
&lt;kbabbitt> ... or any other algo will be similarly abitrarily wrong sometimes<br>
&lt;kbabbitt> astearns: disagree with one point re; source order<br>
&lt;kbabbitt> ... even if not explicitly placing anything<br>
&lt;kbabbitt> ... if what you put into masonry has a large amount of variation in size<br>
&lt;kbabbitt> ... visual order is going to be completely different from source order<br>
&lt;kbabbitt> TabAtkins: comic book panel style with wacky arrangement of panel sizes, still read in order<br>
&lt;kbabbitt> astearns: I heard source order for reading order would be a reasonable thing for masonry generally?<br>
&lt;kbabbitt> TabAtkins: no<br>
&lt;astearns> ack astearns<br>
&lt;kbabbitt> ... we have grid rows and grid columns as values right now<br>
&lt;kbabbitt> ... either we adopt the grid values interpreting grid rows and grid columns as masonry visual<br>
&lt;kbabbitt> ... or we adopt two new masonry keywords, masonry order and masonry visual, that do the two things<br>
&lt;kbabbitt> astearns: we can resolve masonry order is much more like grid order?<br>
&lt;kbabbitt> rachelandrew: yes, do finer details once masonry is fully decided<br>
&lt;kbabbitt> fantasai: agree with resolution not sure it solves issue<br>
&lt;kbabbitt> astearns: it doesn't but it gives you things to throw out at least<br>
&lt;kbabbitt> astearns: Proposed 1: Masonry reading order operates more like grid than flex<br>
&lt;kbabbitt> RESOLVED Masonry reading order operates more like grid than flex<br>
&lt;kbabbitt> RESOLVED: Masonry reading order operates more like grid than flex<br>
&lt;kbabbitt> astearns: could decide on reusing grid values or making new masonry values<br>
&lt;kbabbitt> ... or could leave it<br>
&lt;kbabbitt> rachelandrew: once we have a decision on how masonry is turned on, that makes it more clear<br>
&lt;kbabbitt> ... in terms of names, better to make sure they work well together<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5675#issuecomment-2773715622 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 2 April 2025 20:53:28 UTC