Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set priority for screen readers of some HTML page parts?

I want to make my HTML page suitable for screen readers.

Currently, the page have 3 main parts: header, sidebar and content:

enter image description here

Screen readers read header at first, then sidebar and finally search results.

Unfortunately, users which has problems with eyesight wait for a long time while the program will read all side bar content (cause sidebar contain many filters). How can I set a bigger priority for search results? Cause search results should be read before the sidebar content.

And it will be great if someone provide me a HTML tutorial about what can I do to increase accessibility level of HTML pages:

  • How can I change some DIV elements to be skipped by screen reader?
  • How can I change a sequence of reading page content?
  • How can I make readable only search form and search results (and a few links)?
like image 382
bmalets Avatar asked Jun 10 '15 15:06

bmalets


People also ask

Which attributes can the Screen readers read HTML?

In this case, most screen readers will read out the alt text, the title attribute, and the filename. In addition, browsers display title text as tooltips when moused over.

How do screen readers read HTML?

Screen readers use HTML tags to understand the content and regions of the page, and what elements are available for the user to select. For this reason, the most effective way to make your web pages accessible is to structure your HTML code with semantically rich tags.


1 Answers

Do not try to hide the content from screen reader users, they will want to get access to that content. Instead, you can add landmarks to your content areas. Screen readers will then be able to jump directly to the relevant portion of the page, including the results, but will still be able to get to the other controls when they need them.

If you can use HTML5, use the <header>, <aside> or <nav> and then the <main> elements for your header, filters and side navigation and search results respectively.

If you cannot use HTML5, then add role="banner", role="complementary", role="navigation" and role="main" to the wrapping elements of these regions.

As a best practice you should also add heading structure to the document (screen readers can navigate by these too) and a skip link (for sighted, keyboard-only users)

like image 73
unobf Avatar answered Sep 21 '22 12:09

unobf