-
Notifications
You must be signed in to change notification settings - Fork 123
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
Comments
Looking at https://www.w3.org/TR/html50/text-level-semantics.html#the-em-element, it says:
And in https://www.w3.org/TR/html50/text-level-semantics.html#the-strong-element:
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:
in other words, |
The spec also has:
Do we need a level attribute? |
I think so. The spec has
and "stress emphesis" connects with https://en.wikipedia.org/wiki/Stress_(linguistics)#Prosodic_stress. |
And the strong element can also be nested to indicate a higher level of strong. |
Something else I just noticed regarding the elements in question: Each states that you can use nesting to convey level, e.g.:
I do NOT think we want to see something like:
But if we want true parity with that aspect of |
Github didn't show me your comments until I posed mine in which I say the same thing. Sorry! |
|
Follow-up questions:
|
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 |
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. |
so we do not need aria-level |
I agree that we do not need |
Thoughts on whether or not we need two roles or just one pay-attention-to-me role? |
If there is only one role would it apply to the following four elements?
|
Probably two. Consider their visual presentations: bold ( Conversely, a screenreader might well want to read I can imagine jump-to- |
EDIT for clarification: In answer to the original question, if there were one role it would be just for One would be for |
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. |
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. |
The thing I'm mulling over is the note from the HTML spec that @joanmarie referenced before:
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? 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 :) |
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. |
Roles landed. 0f47d77 |
A question about the ARIA "strong" role: how good is it supported by browsers and screen readers? |
I have tested this with screen reader NVDA and JAWS. By default they behave in such a way that font formatting is not output. However, both screen readers have a mode where font attributes like bold are output.
Interestingly, I.e. Conclusion: |
Because
strong
andem
are not intended to be purely typographical characteristics (unlikeb
andi
), we probably want to have non-generic role parity with them.Question: Is a single "emphasis" (or whatever) role sufficient for both? Discuss. 🙂
The text was updated successfully, but these errors were encountered: