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

MSHTML: Title attribute not reported when using quick navigation or tabbing in browse mode #3158

Closed
nvaccessAuto opened this issue Apr 16, 2013 · 5 comments
Labels
app/internet-explorer bug close/worksforme p5 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority z goodForNewDev (archived)

Comments

@nvaccessAuto
Copy link

Reported by nmatthews on 2013-04-16 20:37
This is likely related to #1354.

When both the aria-label and title attributes are provided on buttons, NVDA reads the aria-label attribute, the identifier button, followed by the title attribute.

For buttons with an image content, the title attribute is used as a tooltip for the button for sighted users.

A similar example would be the following:
http://pauljadam.com/demos/title-aria-label.html

If both of these attributes are included, it seems that they often contain similar or identical text. When looking at a button role, without the aria-label attribute, voiceover on the Mac only reports a "button", due to the different handling of the title attribute. Providing both attributes however, leaves NVDA and Firefox reading both attributes.

When using an element with inner text,

<button title="foo title" aria-label="foo label">foo content</button>

In firefox, this element reads "foo content button foo title", and the aria-label attribute is ignored entirely.
In IE, this element reads "foo label button".

Why the different behaviour? I really expected aria-label to be picked up in Firefox, and I would have preferred that it ignore the title attribute, similar to IE.

Blocking #3711

@nvaccessAuto
Copy link
Author

Comment 1 by jteh on 2013-04-24 01:34
The way things are reported depends on the reason they are reported. The interaction between the browser and the screen reader is also rather confusing.

In general, title attributes are considered secondary information unless there is no other label or content. In this case, they aren't rendered in browse mode. However, if you focus such an element or use quick navigation to get to it, you have chosen to interact with it directly, so NVDA reports the title attribute after the role; the title attribute is mapped to the object's description. The parallel is a sighted user hovering over the object with the mouse; they've chosen to interact with it. You can turn this off in NVDA by disabling reporting of descriptions. So, "label button title" is the intended behaviour.

IE doesn't support aria-label itself, so we had to hack around this, like we have to hack around most things in IE. It's also very inconsistent in the way it maps the title attribute to accessibility APIs. I guess we'll need to try to support the title attribute ourselves, just to make this code even more complicated and hacky than it already is.

The final issue you note regarding Firefox reporting the content instead of the label is #1354.

I'm morphing this issue to just cover the problem with title in IE.
Changes:
Changed title from "Buttons aria-label and title attributes read both" to "MSHTML: Explicitly map title attribute to description"

@bhavyashah
Copy link

@jcsteh While this issue now only covers the title attribute in IE, does it affect later versions such as IE 11 too? If so, feel free to assign this a priority as deemed appropriate.

@jcsteh
Copy link
Contributor

jcsteh commented Aug 15, 2017

It looks like IE 11 does support aria-label, so title gets correctly mapped to accDescription and this therefore gets reported properly in focus mode or when pressing NVDA+tab. However, we don't map accDescription to the description attribute in the vbuf backend, so this doesn't get reported when using quick navigation, etc.

Low priority because it's IE, but this shouldn't be too hard to fix.

@jcsteh jcsteh changed the title MSHTML: Explicitly map title attribute to description MSHTML: Title attribute not reported when using quick navigation or tabbing in browse mode Aug 15, 2017
@jcsteh jcsteh added z goodForNewDev (archived) app/internet-explorer p5 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority labels Aug 15, 2017
@Adriani90
Copy link
Collaborator

@nmatthews is this issue still reproducible?

@Adriani90
Copy link
Collaborator

Testing with NVDA 2019.1.1, Chrome 74, Firefox 66.0.3 and IE11, the behavior is exactly the same in all three browsers. When navigating in browse mode or focus mode, NVDA reports "button foo label". When pressing nvda+tab, NVDA reports "foo label button focused foo title".
I guess Jamie already answered the question raised in the issue description. As of now I think it is safe to close this as works for me. Please comment on it if you are still having questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app/internet-explorer bug close/worksforme p5 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority z goodForNewDev (archived)
Projects
None yet
Development

No branches or pull requests

4 participants