FreedomScientific / standards-support

Contains documentation for Vispero software support of Web standards
https://freedomscientific.github.io/standards-support/
GNU General Public License v3.0
110 stars 12 forks source link

HTML button elements with the role=link JAWS doesn't communicate instructions for use. #775

Closed chrismichalewicz closed 11 months ago

chrismichalewicz commented 11 months ago

Summary

We utlize html buttons that are coded to behave like links so have the role=link when it has focus with JAWS there are not instructions for use communicated. For example "press enter to activate.

Example:

  1. Go to https://engineering.cerner.com/terra-ui/components/cerner-terra-core-docs/hyperlink/about
  2. Tab to the Examples section with JAWS on and when each of the examples has focus. JAWS communicates "Default hyperlink link"

    Expected result

What did you expect to happen? JAWS to communicate "Default hyperlink link, press enter to activate". Similar to how a button element with role=button would behave

Actual result

What actually did happen? JAWS communicates "Default hyperlink link"

Example

A test case that demonstrates the issue - provide linked test case, CodePen, JSbin, etc... Do not have a test case but utilizing the steps in the Examples section shoudl demonstrate the issue

Additional Information

JAWS version and build number

Version 2022.2202.38 ILM

Operating System and version

Windows 10 Enterprise Version 22H2

Browser and version:

Microsoft Edge Version 118.0.2088.61 Chrome Version 118.0.5993.89

davidengebretson commented 11 months ago

My suggestion is that, if you are using a semantic button in your design, then keep it as a button.

First rule of ARIA is to not use ARIA if you don't have to.

From: Chris Michalewicz @.> Sent: Wednesday, October 25, 2023 11:12 AM To: FreedomScientific/standards-support @.> Cc: Subscribed @.***> Subject: [FreedomScientific/standards-support] HTML button elements with the role=link JAWS doesn't communicate instructions for use. (Issue #775)

Summary

We utlize html buttons that are coded to behave like links so have the role=link when it has focus with JAWS there are not instructions for use communicated. For example "press enter to activate.

Example:

  1. Go to https://engineering.cerner.com/terra-ui/components/cerner-terra-core-docs/hyperlink/about
  2. Tab to the Examples section with JAWS on and when each of the examples has focus. JAWS communicates "Default hyperlink link"

Expected result

What did you expect to happen? JAWS to communicate "Default hyperlink link, press enter to activate". Similar to how a button element with role=button would behave

Actual result

What actually did happen? JAWS communicates "Default hyperlink link"

Example

A test case that demonstrates the issue - provide linked test case, CodePen, JSbin, etc... Do not have a test case but utilizing the steps in the Examples section shoudl demonstrate the issue

Additional Information JAWS version and build number

Version 2022.2202.38 ILM

Operating System and version

Windows 10 Enterprise Version 22H2

Browser and version:

Microsoft Edge Version 118.0.2088.61 Chrome Version 118.0.5993.89

- Reply to this email directly, view it on GitHubhttps://github.com/FreedomScientific/standards-support/issues/775, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKX5QZSQMM4CDKWGGHOQXWTYBFI6XAVCNFSM6AAAAAA6PZVVDGVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE3DCOJWHA2DOOA. You are receiving this because you are subscribed to this thread.Message ID: @.***>

JAWS-test commented 11 months ago

@chrismichalewicz I don't understand the problem: If I mark a button with role=link, then JAWS should output the link like a link and not like a button. And that's what JAWS does. So everything is correct here. If it were as you expect, it would be an error in JAWS.

chrismichalewicz commented 11 months ago

@JAWS-test JAWS is outputing it as a link like you mentioned which is expected. The problem, if it is truly a problem, is that we would also expect it to communicate instructions for the end user to interact with it. So something like "this is a link, press enter to activate". The bolded part is what we'd expect to hear that we currently aren't.

davidengebretson commented 11 months ago

That's because, by providing role= link, you are over-riding the semantics of the button element. You'll have to overwrite the button element handlers to get the same feedback from any screen reader or assistive technology.

If you want a link to speak like a button then do the semantic thing:

JAWS-test commented 11 months ago

@chrismichalewicz

press enter to activate

  • JAWS doesn't say that for a normal link (a href element) either, so why would JAWS say that for role=link?
  • Why would JAWS say something like that at all? Everyone knows how a link is activated.

I am in favour of closing the issue

JAWS-test commented 11 months ago

@davidengebretson

<button><a href="foo"> foo</a></button>

Never do anything like that:

davidengebretson commented 11 months ago

Even though there is no ARIA involved? This is simply a semantic link embedded in a semantic button. No ARIA - first rule of ARIA.

From: JAWS-test @.> Sent: Thursday, October 26, 2023 10:04 PM To: FreedomScientific/standards-support @.> Cc: David Engebretson @.>; Mention @.> Subject: Re: [FreedomScientific/standards-support] HTML button elements with the role=link JAWS doesn't communicate instructions for use. (Issue #775)

@davidengebretsonhttps://github.com/davidengebretson

Never do anything like that:

- Reply to this email directly, view it on GitHubhttps://github.com/FreedomScientific/standards-support/issues/775#issuecomment-1782298345, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKX5QZUBOG34CEZIKEO5SWDYBM6EPAVCNFSM6AAAAAA6PZVVDGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBSGI4TQMZUGU. You are receiving this because you were mentioned.Message ID: @.**@.>>

stevefaulkner commented 11 months ago

@chrismichalewicz

press enter to activate

  • JAWS doesn't say that for a normal link (a href element) either, so why would JAWS say that for role=link?
  • Why would JAWS say something like that at all? Everyone knows how a link is activated.

I am in favour of closing the issue

Agree with @JAWS-test closing this as WONTFIX

chrismichalewicz commented 11 months ago

@stevefaulkner @davidengebretson @JAWS-test Thanks for the input, I will pass that onto our a11y team.