0

I am using anchor tag with href="#dashboard" in Jaws and Chrome it is announcing "Dashboard same page link", but I want to avoid "same page link" announcement here without removing href attribute from the element, is there any way to the same

Jaws and Chrome, it should announce "Dashboard link".

Example

<a href="#dashboard" data-modal-content-id="trigger-popup" data-ph-at-id="dashboard" aria-current="false" class="phw-pt-2 phw-g-text-default-dark phw-pb-2 phw-mt-2 phw-pt-xl-1 phw-pb-xl-1 phw-pt-md-2 phw-pb-md-0 phw-mb-md-2 phw-td-none phw-d-flex phw-s-dashboard" data-ps="5e87c0a1-a-1">
  <span class="phw-icon-ctr" data-ps="5e87c0a1-span-9">
    <svg aria-hidden="true" fill="currentcolor" class="phw-i-sz-3" data-ps="5e87c0a1-svg-4">
      <!----><!----><!----><!----><!----><!----><!---->
      <use href="#phw-cns-icon-pentagon" data-ps="5e87c0a1-use-10"></use>
    </svg>
  </span>
  <span class="_tab-text_4vaal_143 phw-ml-1" data-ps="5e87c0a1-span-10">Dashboard</span>
</a>
3
  • 2
    A question: why do you want to do this? You'd be taking information away from those users about how the page will behave. Screen reader users expect to hear certain announcements on certain kinds of content, and don't usually enjoy developers trying to manipulate their experience in unexpected ways. Is there a good reason for doing that, or are you just trying to make it so the link sounds right to you, as (i assume) a non screen reader user?
    – hollsk
    Commented May 2 at 11:15
  • 1
    NO matter your good or bad reasons, I think that you can't. As soon as you have href="#" or href="#something", it triggers the "same page" announcement. Anyway, the previous comment says it well: you shouldn't try to manipulate that information.
    – QuentinC
    Commented May 2 at 19:54
  • If the code is a same-page link, you should try to interfere with how the screen reader announces it. The screen reader is owned by the user, not by the web developer. If the code is intended to emulate a button, then we have a completely different question.
    – Tsundoku
    Commented May 24 at 16:26

0

Browse other questions tagged or ask your own question.