JavaScript for WordPress Forums Vanilla JavaScript Screen Readers & JS

This topic contains 1 reply, has 2 voices, and was last updated by  Zac Gordon 2 years, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #30251

    Belinda Mustoe
    Participant

    This is slightly off topic as it isn’t course related, but I’ve got a project where someone is going to look at the site with a screen reader… so I was wondering, do screen readers read the DOM or the HTML?

    For example if I had a html button that said ‘read me’ in the html, and I changed it via JS to read ‘read this’, would screen readers read out ‘read me’ or ‘read this’ ?

    #31121

    Zac Gordon
    Keymaster

    Hi Belinda!

    You want to look into ARIA w JavaScript. There are a few little things you can add to make single page app designs accessible for screen readers that can also work for what you’re referencing.

    We will cover this in Advanced JS Topics, but here is a quick primer:

    Single Page Apps – ARIA live content regions – https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions
    Basic Show Hide – ARIA hidden – https://www.paciellogroup.com/blog/2012/05/html5-accessibility-chops-hidden-and-aria-hidden/

    Hope that helps!

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.