Comments (8)
from accname.
I think it is a fair simplification to say that a <br>
element is equivalent to CSS generated content of a line break character (although the CSS working group has determined that existing behavior cannot be described so simply, and so it's currently "magic" behavior outside the CSS model).
However, as Bryan hinted at in his reply, the <br>
is only one of many block-level elements that can break up a text. In script-generated DOM, you often won't have whitespace between other block elements, such as <p>
or <li>
. The name & description computations still need to insert whitespace for the visual break caused by the block layout.
So that should be a broader issue: if elements are displayed as separate blocks, insert one whitespace character between them. For CSS-styled content, that could basically be defined as: If an element's CSS display type is not inline
, add whitespace before and after its text alternative when compiling a parent node's alternative text.
For environments without CSS styling, you would use the default display type for the element, which could be defined as lists of block vs inline elements (e.g, in the HTML-AAM).
If specific additional details are required for <br>
, that should probably also go in the HTML-AAM, although maybe with an informative note in the text alternative computation section of this spec.
from accname.
<br>
is only one of many block-level elements
I am not 100% sure, but <br>
seems to get display: inline
, at least in chrome. This is why I think it is special.
from accname.
from accname.
I brought up block-level elements because they don't seem to be mentioned in the current spec text, and they have the same effect of breaking up text.
But yes, relying on CSS display
to describe <br>
would not be sufficient, since it is an inserted forced line break, not a new CSS box. Sorry for going off topic on that point.
My suggestion would therefore have 3 parts:
- In HTML-AAM's Accessible Name and Description Computation section, include an entry for
<br>
that clarifies that it is equivalent to a line break character. - Clarify in AccName step 6 (where there is currently an Editor's note) that you need to add whitespace between the alternatives for block elements, but not between inline text spans.
- Add an informative note about
<br>
to AccName, explaining that even though it is inline, it has an alternative text equivalent to non-collapsible whitespace.
from accname.
Maybe @stevefaulkner or @jasonkiss could comment on the plausibility of adding a <br>
text equivalent to HTML-AAM, for use when computing parent text even though it has no role itself.
from accname.
The issue of how to process <br>
issue is closely related to #3. It should not be addressed independent of all the other white space considerations, which, due to their complexity, are targeted for accname 1.2.
from accname.
from accname.
Related Issues (20)
- Examples missing content HOT 6
- Getting the value: action steps
- Update "host name language" references with links.
- Seeking clarity on name property with `div` HOT 5
- AccName algo probably needs an update for ::marker HOT 6
- AccName term "CSS textual content" for pseudo elements is undefined/ambiguous HOT 1
- AccName forces whitespace joiners between all inline element scenarios HOT 5
- Update old after/before pseudo-element reference link in section 4.3.2 F HOT 1
- Interior whitespace questions in this AccName text node test HOT 12
- Ambiguity in AccName LabelledBy section: "[if] current node is not already 'part of' [sic]…traversal" HOT 19
- Task: verify review feedback from PR 150 made it in
- Ambiguous but normative requirement about hidden nodes is hidden by default in AccName HOT 6
- Clarifying "text node" definition (step 2G) HOT 1
- `name` not allowed on a `li` element HOT 16
- `Summary` not allowed as child of `div`
- Editorial: Remove all the collapsed content in accname
- accname can reference generic with label in a labelledby comp, but is underspecified HOT 3
- ARIA/AccName Conflict: aria-label allowed on generic in a traversal, but labelling a generic is an author error due to "name prohibited" HOT 2
- LabelledBy Recursion is not actually recursive, so it should be renamed. HOT 1
- AccName stable branch is now severely outdated. Is there anything editors recommend keeping? HOT 4
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.
element
from accname.