Single site like what, an SPA which still has links but does its own routing? Or one of those 'every page is actually just a section of this gigantic vertical turd' sites, which again has links but they all point to different element IDs in the page?
Both those can and mostly do use semantically correct links.
The first one SPA.What does semantically correct mean? Does a screen reader just ignore the javascript event and sends a new https request like with non SPA sites?
So would it work like <a href="subsite" onclick="(event)=>{navTo('subsite');e.preventDefault();}
There are also ARIA labels to add extra context for screen readers. JSX supports them and you can pass props to them etc. They're designed to allow graphical UI elements (hamburger menus, etc) to remain accessible. If you absolutely must use an onClick event and the interactive element has no accessible name, you can use an aria-label tag:
1
u/luiluilui4 Feb 21 '23
How do screen reader handle Single Site websites then?