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

[css-grid][css-flexbox] Discussion of removing logical order exclusion for readers in the near future. #2405

Closed
hunboy opened this issue Mar 6, 2018 · 2 comments
Labels
a11y-tracker Group bringing to attention of a11y, or tracked by the a11y Group but not needing response. Closed Rejected as Wontfix by CSSWG Resolution css-flexbox-1 Current Work css-grid-1 Tracked in DoC

Comments

@hunboy
Copy link

hunboy commented Mar 6, 2018

Current state:
https://drafts.csswg.org/css-flexbox/#order-accessibility

Authors must use order only for visual, not logical, reordering of content. Style sheets that use order to perform logical reordering are non-conforming.

Testcase:

https://www.utasirobert.com/order.html

Let me explain this testcase. This is an asyncronous paralel result, the buttons are atomic objects generated expensively by the server. This way is cheap in this theoretic testcase, and in client side we can group them easily by the "order" css property, each skills go to their own group. This true for additional items as well.
Now we have 1 problem with the readers. Based on the spec reader reads it in phisical order.

To trying solve this problem, let's modify the sctructure using "aria-ownedby" attribute on items. The result is here:

https://www.utasirobert.com/order3.html

This is almost good ONLY (only!) 1 problem is with it, there is no "aria-ownedby" attribute in WAI-ARIA standard, however it shows the GUI as expected.

Let's analyze the WAI-ARIA what he suggests:

https://www.utasirobert.com/order2.html

The answer is "aria-owns" attribute, so now it reads as expected. But... BUT it is a very expensive way, we must declare unique ID for each items, and we need group them manually in the "aria-owns" attribute, which is very-very expensive, and kills the paralel generation way, requires 3 more select in order, so we might ignore this feature (which is inconsistent or really difficult to solve by manipulating the attribute of heading elements).

Summary: in the paralel asyncronous age we must apply the css order for modern readers, anyway we can't group cheaply or normally the elements.

Another testcase:

https://jsfiddle.net/utasir/rsvu6k9q/61/

In this testcase I emulate an asyncronous webpage generating. The result is always a non-deterministic order of the elements. GUI solves it with css-grid order algorhytm, but not for readers.

In the near future I'll suggest to remove the "logical order exclusion for readers" part from the spec. Or at least defining "aria-ownedby" attribute in WAI-ARIA.

@fantasai
Copy link
Collaborator

fantasai commented Mar 8, 2018

If the order matters, then it should be reordered in the source. The order property is not meant to do this, it is for visual effects only. The CSSWG has discussed this multiple times in the past, our position has not changed: the source order must be the meaningful order of the contents. Otherwise what happens if CSS is turned off or not supported? The HTML document needs to make sense on its own.

Additionally, changing the behavior of order now would break websites which use it correctly, to create a visual reordering that does not affect the reading order.

@hunboy
Copy link
Author

hunboy commented Mar 8, 2018

@fantasai yes, Here is an anomaly testcase with display: contents emulating subgrid:

https://jsfiddle.net/utasir/b016u8a5/

In other way this represents why subgrid is different than display: contents, This feature is against of this topic, noone wants to reorder for readers the phisical order.

But we will need to handle the paralel issue in the near future for readers. As I mentioned above perhaps aria-ownedby attribute would be good for it (if will be exist)

@plehegar plehegar added the a11y label Nov 2, 2018
@fantasai fantasai added this to the css-grid-1 CR 2017-12-14+ milestone Jan 23, 2019
@plehegar plehegar added the a11y-tracker Group bringing to attention of a11y, or tracked by the a11y Group but not needing response. label Feb 15, 2020
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. Closed Rejected as Wontfix by CSSWG Resolution css-flexbox-1 Current Work css-grid-1 Tracked in DoC
Projects
None yet
Development

No branches or pull requests

3 participants