Comments (9)
Some context (direct comment link) as to where this issue came from:
IOW, is it still a list item? Despite the unexpected (invalid?) context, if it renders the bullet, sighted users will probably perceive this as a list item, so the accessibility runtime should probably convey that to the screen reader or other assistive technology, too.
Another variant of the OP that contains the original list context, but includes a generic tweener div:
<ul>
<div>
<li>one</li>
</div>
<li>two</li>
<li>three</li>
</ul>
from html.
I am not speaking for any particular implementation team, but I suspect that implementations will not want to deal with the compat fallout of changing UA styles here.
Additionally, I don't think we should change HTML's conformance criteria around <li>
elements. If you use them outside an <ol>
or <ul>
, your HTML validator should give you an error.
So the most practical route here seems to me to be changing the AT mapping to match the visual mapping, so that invalid list items are displayed to AT users the same way they are to sighted users.
from html.
thanks for the thoughts, @domenic. i realized when raising this issue that compat would likely be the response to not change the styling. but, figured since it would be changing the styles for invalid use cases, maybe that wouldn't be as problematic.
Additionally, I don't think we should change HTML's conformance criteria around
elements. If you use them outside an <ol>
or<ul>
, your HTML validator should give you an error.
absolutely agree. i wasn't proposing otherwise. apologies if that wasn't clear.
So the most practical route here seems to me to be changing the AT mapping to match the visual mapping, so that invalid list items are displayed to AT users the same way they are to sighted users.
We can definitely bring this back to the ARIA wg to get consensus on what the mappings should end up being across browsers. i think there's more to discuss concerning what is visually presented and if that's necessarily how it should be mapped or not. but that can happen outside of this issue.
thanks
(going to leave this open a bit longer in case anyone else wants to comment. but if the HTML editors feel this issue has been answered, then i'd be fine with this issue being closed)
from html.
For the sake of webcompat, shouldn’t the HTML or CSS spec document what is already happening, and therefore define rules for the WPT rendering tests, and subsequently accessibility WPT tests too?
I’m not convinced it’s the best approach to leave it to accessibility engineering to figure out what to do about this mainstream rendering ambiguity. If the browsers are all doing the same thing, it should be reasonable to document the behavior. If the browsers are doing different things, we have a compatibility problem the HTML or CSS spec should address, even in the case of an author error.
from html.
Do we have any data how big of a problem this is in practice?
from html.
From talking to Anne offline, the spec-defined UA stylesheet rules (that render the bullets on orphaned list items) may sufficiently address what I called out as an ambiguity. If others agree, then I concur this could be addressed as a mapping issue in HTML-AAM.
from html.
i think there's more to discuss concerning what is visually presented [...]. but that can happen outside of this issue.
I mean, that's the topic of this issue, right? We should discuss if implementers are willing to change the UA stylesheet here, I think. Above I guessed they wouldn't be, but we haven't gotten any clear word yet from them!
For the sake of webcompat, shouldn’t the HTML or CSS spec document what is already happening
They do. The HTML spec documents that all <li>
s are rendered with display: list-item
. (I guess this is what @annevk explained offline.)
from html.
I'm pretty sure that stray li
elements, or li
elements in div
in ul
, appear often enough on the web that it would break websites to change the UA stylesheet. But let's have a look.
Here's a query in httparchive to figure out which tags precede li
(ignoring ul/ol/menu and void elements and RCDATA/RAWTEXT elements and audio/video):
https://docs.google.com/spreadsheets/d/1ea2vV0e8hKaaP-6zelZ_RS98LLq139MVp16b5DB8Jt0/edit?usp=sharing
Summary: the table below shows how many pages use tag
before li
, out of 10,000 pages:
tag | count |
---|---|
div | 276 |
a | 62 |
span | 34 |
nav | 11 |
td | 8 |
p | 6 |
strong | 4 |
font | 3 |
section | 3 |
form | 3 |
button | 2 |
aside | 2 |
center | 2 |
b | 2 |
marquee | 1 |
h | 1 |
figure | 1 |
header | 1 |
dd | 1 |
SELECT COUNT(DISTINCT page) AS count
gives 406 pages, so 4.06% of pages are potentially affected. (I did not check for which author CSS is applied, so the breakage is likely a subset.)
Example: http://lucabenetti.altervista.org/
from html.
The dir
element did not show up in the data (though it might in the full dataset which is ~1000x larger), but should probably be handled like ul
in html-aam, see w3c/html-aam#486
How to represent the above pages in a useful manner to ATs I'm not entirely sure.
In any case, I think the data suggests that we shouldn't change the UA stylesheet. Closing.
from html.
Related Issues (20)
- If a web author sets dropEffect to something that is not allowed according to spec, should UA respect their choice by updating dropEffect attribute?
- template.content has unusable value HOT 1
- Clean up HTML <-> DOM hooks HOT 2
- Consider improving interoperability of <iframe> throttling margins. HOT 10
- The dropEffect column in the Drag and Drop events summary table should clarify it represents default values.
- Drag and drop spec allows multiple values for dropEffect which might cause browsers to behave differently.
- How should UAs handle web authors setting dropEffect values?
- Proposal for event ordering when inserting replacement text such as text prediction, spell checker, etc
- It's unclear how shadows should be drawn across various compositing operators HOT 2
- Should custom validity error message treat \r as newline? HOT 3
- Upcoming WHATNOT meeting on 5/16/2024 HOT 5
- Date Picker popup doesn't propagate shadow DOM events into the light DOM HOT 1
- Clarify `detail` value of synthetic click event HOT 3
- Consider making "gamepadconnected" part of “activation triggering user event”? HOT 1
- Meeting 2 for joint OpenUI-WHATWG/HTML-CSSWG task force on styleable form controls HOT 4
- Upcoming WHATNOT meeting on 5/23/2024 HOT 6
- [Proposal]: Enable `HTMLElement` attributes to be toggled without JavaScript HOT 2
- Issue with Step 10 of inner navigate event firing algorithm HOT 2
- Provide native validation messages for native validity states on Form Associated Custom Elements
- Upcoming WHATNOT meeting on 5/30/2024
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from html.