I have an HTML table with a hyperlink in the last column. When the hyperlink is clicked, a dialog window is shown.
I need to make this HTML table accessible to non-sighted users.
Since the users will be using JAWS commands for navigating through the table, there is a good likelihood that the screenreader is positioned on row ‘x’ while a link from row ‘y’ has the focus. In this case, if the user presses a tab, the focus will move to the next focusable item which could be in any row of the table or even outside the table. How should such a table be made accessible? Is there a way to activate the link, when the screenreader reaches a particular table cell?
You don’t have to worry about this issue if your table is accessibly marked up in the first place. See this Accessible Data Tables article for how to do it and information on how screen-readers interpret tables.
Screen-reader users will have their own preferred way of navigating through links and tables, same as any other user. Your responsibility is to make sure the content on the page is properly marked up and labelled, so that the browser and screen-reader software can present it to the user in whatever way they prefer.
Don’t activate any links for the user based on tabbing or focus, let them choose whether to open them or not. You should never take control away from the user. For example, what if they focus on the link, listen to what it links to, then realise it’s not the one they want? If you simply present a well-labelled and marked up link, they can move on, but if you’ve automatically opened it for them you’ve changed the page without them even being notified, and made it harder for them to get back to the main page and to the information they really wanted.