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

Need role(s) for semantic emphasis (parity for strong and em elements) #905

Open
joanmarie opened this Issue Feb 20, 2019 · 21 comments

Comments

Projects
None yet
8 participants
@joanmarie
Copy link
Contributor

joanmarie commented Feb 20, 2019

Because strong and em are not intended to be purely typographical characteristics (unlike b and i), we probably want to have non-generic role parity with them.

Question: Is a single "emphasis" (or whatever) role sufficient for both? Discuss. 🙂

@joanmarie joanmarie added this to the ARIA 1.2 milestone Feb 20, 2019

@joanmarie joanmarie self-assigned this Feb 20, 2019

@joanmarie joanmarie added the Agenda label Feb 20, 2019

@joanmarie

This comment has been minimized.

Copy link
Contributor Author

joanmarie commented Feb 20, 2019

Looking at https://www.w3.org/TR/html50/text-level-semantics.html#the-em-element, it says:

The em element also isn't intended to convey importance; for that purpose, the strong element is more appropriate.

And in https://www.w3.org/TR/html50/text-level-semantics.html#the-strong-element:

The strong element represents strong importance, seriousness, or urgency for its contents.

So on the one hand, they have different meanings; on the other hand, both are "pay attention to this bit more than the other bits" elements. So I personally am leaning towards a single role rather than two.

Somewhat related, I think, to which way we go is the fact that the HTML spec includes this example:

Anger mixed with emphasizing the cuteness could lead to markup such as:
<p><em>Cats are <em>cute</em> animals!</em></p>

in other words, em seems at least in part connected with the spoken presentation. I think that may go beyond the scope of ARIA. Also, APA has a task force related to pronunciation. So perhaps the way to achieve parity for that aspect of em is not through us, but by a combination of using our new pay-attention-to-this-bit role and the to-be-created pronunciation support expected out of APA.

@pkra

This comment has been minimized.

Copy link
Member

pkra commented Feb 20, 2019

The spec also has:

The level of stress that a particular piece of content has is given by its number of ancestor em elements.

Do we need a level attribute?

@pkra

This comment has been minimized.

Copy link
Member

pkra commented Feb 20, 2019

in other words, em seems at least in part connected with the spoken presentation.

I think so. The spec has

The em element represents stress emphasis of its contents.

and "stress emphesis" connects with https://en.wikipedia.org/wiki/Stress_(linguistics)#Prosodic_stress.

@pkra

This comment has been minimized.

Copy link
Member

pkra commented Feb 20, 2019

And the strong element can also be nested to indicate a higher level of strong.

@joanmarie

This comment has been minimized.

Copy link
Contributor Author

joanmarie commented Feb 20, 2019

Something else I just noticed regarding the elements in question: Each states that you can use nesting to convey level, e.g.:

The relative level of importance of a piece of content is given by its number of ancestor strong elements; each strong element increases the importance of its contents.

I do NOT think we want to see something like:

<div role="pay-attention-to-this-bit">
   <div role="pay-attention-to-this-bit">
      <div role="pay-attention-to-this-bit">Bla bla bla!</div>
  </div>
</div>

But if we want true parity with that aspect of strong and em, do we want to consider making aria-level be a supported property of our new role? (Yes, I do feel silly for suggesting that possibility, but I don't know what else to do regarding the nested-element "feature" of the elements in question -- other than ignore them.)

@joanmarie

This comment has been minimized.

Copy link
Contributor Author

joanmarie commented Feb 20, 2019

The spec also has:

The level of stress that a particular piece of content has is given by its number of ancestor em elements.

Do we need a level attribute?

Github didn't show me your comments until I posed mine in which I say the same thing. Sorry!

@carmacleod

This comment has been minimized.

Copy link
Contributor

carmacleod commented Feb 20, 2019

aria-level makes sense here. not silly at all. 😄

@joanmarie

This comment has been minimized.

Copy link
Contributor Author

joanmarie commented Feb 20, 2019

Follow-up questions:

  1. Which is more important: aria-level value of 1 or aria-level value of 100? Are we consistent with heading levels and item levels (in which the biggest, top-level stuff has the smallest number)? Or is an importance level more like a fire alarm (a five-alarm fire being a much bigger cause for concern than a two-alarm fire)?
  2. If the author does indeed use nesting (e.g. because the whole sentence is important, but a phrase within it is super important), are user agents expected to calculate the value of aria-level, or are authors expected to specify it?
  3. What is the default/fallback value for aria-level?
@pkra

This comment has been minimized.

Copy link
Member

pkra commented Feb 20, 2019

The answer to 2) seems to depend on what HTML(-AAM) wants.

@joanmarie

This comment has been minimized.

Copy link
Contributor Author

joanmarie commented Feb 20, 2019

The answer to 2) seems to depend on what HTML(-AAM) wants.

@stevefaulkner: You have an opinion on this? EDIT: And the rest of the aspects related to aria-level and exposure to ATs. BTW, if strong is for importance and NOT just for bold, then a) is the way to expose it really as a text attribute? and b) should there be a specific way to expose nested strong?/

@a11ydoer

This comment has been minimized.

Copy link
Contributor

a11ydoer commented Feb 28, 2019

I am not in favor of "aria-level". I think aria-level is more relvant to something quantifiable concept with a structure, like the value of 3 from 1 to 5. The level of emphais for specific content by content creators seems to be more qualitative and subjective matters, not easily quantifiable.

https://www.w3.org/TR/wai-aria-1.1/#aria-level

@jongund

This comment has been minimized.

Copy link
Contributor

jongund commented Mar 28, 2019

  1. WYSISWYG editros like CKEditor and TinyMCE will filter out nested STRONG and EM elements, also content management system like Drupal.
  2. People can already nest any new strong or emphasis role, for example

<div role="strong"><div role="strong">important</div></div>

so we do not need aria-level

@carmacleod

This comment has been minimized.

Copy link
Contributor

carmacleod commented Mar 28, 2019

I agree that we do not need aria-level on these roles, because as @jongund points out, they can just be nested. Also, since some editors and cms' filter nested em and strong elements, we probably don't even need to note that it is possible. If AT ever decide to use the information, then guidance can be added to the APG.

@joanmarie

This comment has been minimized.

Copy link
Contributor Author

joanmarie commented Apr 9, 2019

Thoughts on whether or not we need two roles or just one pay-attention-to-me role?

@jongund

This comment has been minimized.

Copy link
Contributor

jongund commented Apr 9, 2019

If there is only one role would it apply to the following four elements?

  • strong
  • b
  • em
  • i
@quasicomputational

This comment has been minimized.

Copy link

quasicomputational commented Apr 9, 2019

Probably two.

Consider their visual presentations: bold (strong) draws the eye and attention and encourages the reader to pay attention to its contents on first look without regard to the surrounding context; italics (em) are specifically designed not to draw the eye, but to give the marked text some distinguished role in context.

Conversely, a screenreader might well want to read em differently to the surrounding text (e.g., with heavier stress emphasis), but it's not obvious that strong ought to be read differently, or in the same way as em.

I can imagine jump-to-strong being (theoretically) useful but I can't imagine the same for jump-to-em, so I suspect they should be different roles.

@joanmarie

This comment has been minimized.

Copy link
Contributor Author

joanmarie commented Apr 9, 2019

If there is only one role would it apply to the following four elements?

  • strong
  • b
  • em
  • i

EDIT for clarification: In answer to the original question, if there were one role it would be just for em and strong. The statement below is what would happen if there were two.

One would be for strong and one would be for em. Based on the HTML spec(s), b and i seem to be limited to purely typographical characteristics, thus they are going to be assigned the to-be-created generic role. (The specific typographical characteristics would fall under the heading of candidate attributes during the 1.3 cycle.)

@jongund

This comment has been minimized.

Copy link
Contributor

jongund commented Apr 9, 2019

Seems like one role would suffice, unless there is clear authoring advice on where a "strong" role should be used instead of a "emphasis" role, which I think would be hard to get anyone to follow anyway.

@jnurthen

This comment has been minimized.

Copy link
Contributor

jnurthen commented Apr 15, 2019

my opinion is one role and we potentially in the future(in 1.3) add an attribute to distinguish them. I'm confident at the moment adding a single role is enough.

@scottaohara

This comment has been minimized.

Copy link
Member

scottaohara commented Apr 16, 2019

The thing I'm mulling over is the note from the HTML spec that @joanmarie referenced before:

The em element also isn't intended to convey importance; for that purpose, the strong element is more appropriate.

Using one role but then later adding an attribute to indicate what type of importance/emphasis is meant seems like it could just be settled out of the gate with two roles.

If only starting with a single role, what would the role default to prior to an attribute created to re-distinguish them? strong, or em?

Consider:

<p>
  <span role="new-role">Note:</span> 
  I would <span role="new-role">really</span> like to understand this a bit more.
</p>

With HTML I would have marked that up as:

<p>
  <strong>Note:</strong>
  I would <em>really</em> like to understand this a bit more.
</p>

The way I'd want those to be announced or exposed aren't the same. E.g. For strong I'd expect the screen reader to possibly change volume in which "note" is announced. But for the emphasis, possibly the pitch.

If we go with one role, and a future attribute, authors could go back and revise to:

<p>
  <span role="new-role" aria-emphasis="important">Note:</span> 
  I would <span role="new-role"  aria-emphasis="something">really</span> 
  like to understand this a bit more.
</p>

Again, if we just go with the two roles, it's less the author would have to do:

<p>
  <span role="strong">Note:</span> 
  I would <span role="emphasis">really</span> like to understand this a bit more.
</p>

Thoughts? and thanks :)

@joanmarie

This comment has been minimized.

Copy link
Contributor Author

joanmarie commented Apr 18, 2019

I'm afraid I was persuaded more by @scottaohara's argument than the others. 😁 And we need something to review and move forward. So my initial pull request (#953) has two roles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.