-
Notifications
You must be signed in to change notification settings - Fork 125
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
method to determine how blocks of text are separated (aria-text separation (property)) #699
Comments
The exact nature of the role(s) will be influenced by the input we receive from stakeholders responding to the HTML element/role-parity triage. Thus adding the "blocked" label for now. |
Dupe of #525 |
I think #525 may prove to be a subset of this issue, but ok. |
Actually, I'm re-opening because #525 may prove to be a subset of this issue. We're taking a different approach to triaging and tackling these roles, and I'm reserving the right to open new broader issues such as this one. I, of course, don't want to immediately close out old issues which have discussion. So there may be duplicate issues. I promise to clean things up in the end. Hope that's ok. 😄 |
Conclusion from the Working Group face-to-face today is that we're going to create two generic roles: |
First attempt at fleshing out block/inline roles is in PR #805 in branch issue699-block-inline. Reminders for later:
|
@joanmarie I'm sorry I did not see the decision from May until @carmacleod's PR went in, but I think this is a serious mistake. It's unfortunate that the original issue #525 was closed in favor of this one, because more of the discussion (and my defense of a single "generic" role) happened there. My main objection is that this conflates an ARIA role with a style (display: inline vs display:block). Separation of content (usually markup) from presentation (usually CSS) is widely understood to be a good thing for the Web, so I'm at a loss to understand why the working group wants to two new entirely style-based roles. My best guess is that it's caused by a misunderstanding of how these are represented by user agent implementations. Screen readers treat block and inline elements differently, and I know members of the WG don't want to lose this functionality, but I don't believe that's at risk. WebKit and Blink (maybe other user agents too) expose differences in these generic elements because they are styled differently, not because the element is tied to a block or inline role. Therefore a single generic role would work for both, and user agents can still expose any presentational relevance (block, inline, bold, italic, underline, etc) without adding presentational roles to the ARIA role hierarchy. Adding some other implementors in case they know of an implementation reason we would need style-based roles. @aleventhal @asurkov @minorninth @alice @hober @dwsinger |
The best suggestions I saw in Issue #525 were these two:
I'd prefer either of those to adding style-based ARIA roles. |
@cookiecrook, I know we had a role vs attribute discussion at the meeting in Toronto in May, and I do not clearly recall the reasons we landed on role. You can see in the minutes for May 1 that I raised the possibility of an attribute. I honestly believe there was a good reason for going with role instead of attribute. I do not recall going in with a strong opinion on that point. I didn't leave with one, but I remember the decision as rational, not arbetrary. So, we may need to do some more brain-digging on that point so we can at least document it, and, per your request, revisit it. However, One point where we are not connecting is on the "presentation" vs "semantics" issue. I think it would beneficial if we could sort that out. If I understand correctly, You do not support having two roles, but you could support a property that distinguishes between elements that should be treated as blocks and elements that should be treated as inline. And, this is because roles should not be used to represent style. In issue 525, you wrote:
and, in this issue you wrote:
I would 100% agree if the types of presentation did not have semantic significance. However, the types of presentation we are talking about completely change meaning and understandability. That is why browsers occasionally, and frequently differently, remap based on style in an attempt to correctly represent the meaning the author is conveying. Unfortunately, that remapping based on style goes wrong as or more often than it goes right. So, it is imperative that we give authors a way to explicitly declare the semantics that is independent from styling. On Windows, <p>The following 3 spans are read as the single word, "cat", with any version of either JAWS and NVDA using any version of Chrome, Firefox, or IE:</p>
<span>c</span><span>a</span><span">t</span>
<p>The following 3 block style spans are read as a single word, "cat", with any version of either JAWS and NVDA using any version of Chrome, Firefox, or IE:</p>
<span style="display:block">c</span><span style="display:block">a</span><span style="display:block">t</span> The default treatment of In other words, there are accessibility semantics associated with inline and block styling. While you have pointed out that this is historically the consequence of an implementation detail in browsers, that does not remove the fact that authors have both intentionally and unintentionally relied upon those implementation details for their semantic consequences. From my perspective, turning those side effects of implementation into explicit first-order effects is one of the primary objectives of this issue. The fact that we have not had explicit ways to declare block and inline semantics independent of style has created real problems in some browsers. That said, if the rest of the group is open to reconsidering the role verses attribute decision, this would become a mute point if the decision were to change. While I would be more comfortable if we had consensus on both the rationale behind the specification and the actual specification, mostly because that rationale effects pedagogy, I grant that consensus on rationale is a nice-to-have. |
semantics: read blocks separately; read inlines run together |
Matt's comments seem to confirm this decision was made based on the current interaction of Windows-based browser+screen readers combinations. As mentioned in #525, its the opposite behavior of the Mac browser+screen readers combinations. That and my other objections seem to confirm this is worthy of revisiting. |
@cookiecrook My opinion is that we should let browsers determine if an element should be inline/block using their internal rules but we should provide an ability in ARIA for a developer to override the browser and state that an element really should be either inline or block. Do you agree with this? |
Conceptually, I sort of agree, but definitely not as a role, and definitely not as the values |
I think it's reasonable for the WG to consider a feature that indicates whether element breaks are considered meaningful. Is the purpose of this limited to whether or no screen reader speech is continuous, or is there another benefit to other types of Assistive Tech? |
I am a strong supporter of having two generic roles which reflect the normal inline vs block semantics of HTML elements, and the presumed whitespace/line-breaks that come with them. However, I agree with @cookiecrook that using the CSS terms is problematic, because the CSS can be overridden, and has hybrid layout options like I'd suggest looking instead to the HTML terminology. The "inline-by-default" HTML elements are called "phrasing content", so maybe the "span" role could be For the "block" role, there isn't a clear term in HTML. But when you look at the list of elements that are default block-layout in HTML, the only non-deprecated ones that don't have a more specific role are If |
So to summarize, we have either separate roles:
Or single role with attribute (property):
Did I miss any? Some other possible words that could be used for role or property names:
TBH, I'm a little unclear on why we seem to be leaning towards "two roles" rather than "one role and a property"? Might be slightly more "future proof" to use a property, i.e. easier to add a new property value than a new role? |
@carmacleod wrote:
👍 Since the goal seems to be overriding AT element separation behavior (useful on any element or role), it shouldn't be a role.
There are lots of options, but enough members of the WG are convinced this shouldn't be a role, I move to 1) open a new issue for the element separation behavior (which would likely end up as an attribute), and 2) reopen the original issue #525 to address the need for a generic role. |
Seems like there is some agreement that there are two semantics that have been accidentally or unintentionally imposed by Even though there are some differences among browsers that effect whether or not these semantics are perceived by screen reader users, the vast majority of the time, the appropriate semantic is conveyed. This good luck has been supported by a variety of circumstances, including the popularity of particular browsers and screen readers as well as customary usage patterns for BTW, @cookiecrook, VoiceOver in Chrome does not work the same as VoiceOver in Safari when reading Proposal for minimum requirements to address with new ARIA attributesHere are the requirements I think we need to address:
The The semantics currently expressed by today's treatments of Another thing to keep in mind is that the resolution to this issue could have consequences for the name calculation and how strings are concatenated. This is especially true for elements that are named from content where that content consists of one or more generic containers that contain text. If the effects of the role or properties we develop for this issue were inherrited by descendants, we'll have yet one more complexity to consider during recursive collection of text for naming. Another requirement to considerConsider: <h1><span>foo</span><span>bar</span></h1>
<a href="..."><div>foo</div><div>bar</div></a> In circumstances like the above, CSS is used to separate "foo" and "bar" in ways that could lead to either "foo" and "bar" getting lumped together as a single word or separated into two separate elements while the most accessible result would be to have them read as a string of two words "foo bar". However, getting them to be space delimited is actually challenging. It means adding a 3rd element to contain the space or adding space to one of the existing elements. Often, neither of those options is practical. I think we could solve this issue in a way that gives authors the ability to fix problems like this, which have become extremely common. Proposal for solutionblob (role)Generic, nameless grouping container that can be used to specify how child text nodes are presented to assistive technologies. Superclass: structure aria-text separation (property)Indicates the type of separation, if any, that is required between the text nodes contained in the blog and its sibling elements. If a blob contains one or more text strings, and if any contained strings are at the start or end of the blob, the value of the aria-textseparation property specifies how those text strings will be separated from text strings contained by sibling elements. Allowed values:
Mappings for
|
@mcking65, I like where you're headed, with a few mods: Role: I'm not sure about the role name "blob"… Why do you prefer this over the previously proposed "generic" name? Attribute: How about aria-whitespace? values could be space, line-break, paragraph-break, none, and inherit. |
I like the direction, also. This (by either set of names) would solve a long-standing problem. Although, if AT would look for
NVDA and JAWS both say "$499" instead of "$4.99" (a significant difference in price that is only apparent visually). Blob is a very cool name, but maybe it's a bit too "computer jargony"? Maybe Regarding attribute, @cookiecrook You asked:
I would guess that voice commands like "Go to cat" or "Select cat" in Matt's "cat example" would benefit. I tested a version of the cat example on Windows with 2 screen readers in 3 browsers:
The visual rendering is: divs: c, a, t, inline divs: dog, spans: cow, and block spans: p, i, g.
Given that inconsistency, it's obvious that authors need a way to help AT interpret these things. |
@cookiecrook commented
Funny ... But, let's keep in mind that, hopefully, all readers are aware that the spec is not a transcript of a legislative hearing about nominees for judicial positions. @cookiecrook commented:
Thank you for the assistive tech dev use cases. Those, combined with the case of the generic being focusable, are sound reason for having the role rather than mapping to none. Would the following wording be more acceptable?
@cookiecrook commented:
Nameless is meant to say that the generic element cannot be named, i.e., labeled. So, two critical aspects of the definition are:
This implies a need for a requirement on assistive technologies. That seems necessary if we can't express the requirement at the API level. |
two random examples we were talking about in f2f: |
Quickly testing @schne324's examples with JAWS/NVDA in Chrome/FF. Example 1
Example 2
|
As part of achieving role parity with HTML, we will need to create at least one generic role.
The text was updated successfully, but these errors were encountered: