قالب وردپرس درنا توس
Home / Tips and Tricks / How to fix website accessibility issues – CloudSavvy IT

How to fix website accessibility issues – CloudSavvy IT



Handicapped logo.

Blind people also use the internet, so making your website accessible to them – and others with disabilities – will enhance their experience with your business. If you are a government contractor, this may also be required of you by law.

What is section 508?

Section 508 is a federal law that prescribes federal websites must be accessible, much in the same way that buildings are designed with wheelchair ramps and automatic doors. Public websites must be easily accessible by screen readers and provide other accessibility tools. Section 508 is specifically for .gov websites, but if you receive any form of government money, your website must also be available under section 504 of the Rehabilitation Act of 1

973, or you may be sued and fined.

If you are completely in the private sector, do not do it legally must comply with section 508/504. However, you should still design your website for the disabled. Often, these people will access your site with the help of a screen reader that reads your site for them. Getting your website to behave as expected through a screen reader is an important part of accessibility compliance.

How to check the availability of your website

A good toolbox for seeing accessibility issues is tota11y from Khan Academy. It is a plugin you install on your website by adding one

This plugin shows errors next to the corresponding elements and then tells you what to do to fix them:

shows completely wrong on the site

It also has a very handy tool that shows how a screen reader sees your website.

In addition, you can run your entire site through an accessibility checker such as PowerMapper, which checks for WCAG 2.0 compliance.

Common accessibility issues (and how to fix them)

To make your site accessible, you do not have to redesign everything, just crush any bugs that you may have missed when you created it. Usually this problem is minor, and it's just a matter of adding a few extra elements.

Alt-text

All text on images is an important issue. Text is easy for a screen reader to handle, but images cannot be easily translated automatically. So you need to provide a translation, even if it is short and simple. This can be done by adding alt notice:

happy old man

Otherwise, a screen reader will read the file name. But if the image is decorative and you want the screen reader to ignore it, you can specify one alt tag but leave the content blank.

Uppercase

Uppercase letters can cause some confusion for screen readers. For example, the word "us" is often read as "USA" when activated. To fix the problem, choose to use the CSS property instead text-transform instead of using the text itself.

text-transform: uppercase;

This has the added benefit of being applicable to all headings and can easily be changed if your design changes in the future.

Navigation on the keyboard

Your website must be accessible using the tab key to scroll through elements. An important part of this is "Skip Navigation" links. Websites often have headlines on every page, and flipping through them is very frustrating when browsing. So the first thing a user navigating with the keyboard should see is one tag with one href to your main content.

Obviously, you do not want this in your headline all the time, just when someone loses it. This is usually done by setting an element with a low z-index to change z-index when you are focused, use the CSS selection modifier :focus:

.show-on-focus:focus {
  z-index: 1;
  top: 0;
  left: 0;
}

Another issue is the lack of articles with tables. Important landmarks on your site should be easy to navigate. You can do this simply by adding tabindex attributes to elements:

...

You can have multiple indexes on the same number, and they will be read in descending order, based on their position in HTML. You can change the number to take into account blocks that are not in order.

Contrast

This is not just an accessibility tip, as it applies to your site in general. If the contrast is too low, people with impaired vision may have difficulty seeing it, but it can also affect ordinary people if the problem is serious.

Fortunately, tota11y does a great job of telling you which elements are having problems:

tota11y tells you which elements have problems.

It will also suggest replacement colors that can enhance your contrast. Note that the contrast also depends on size, as smaller text is more difficult to create on similarly colored backgrounds.

Input labels

A few the tag must have a corresponding one , so that the screen reader knows what the input is for. Sometimes it can fall back on placeholders, but it is not enough.


The the tag is placed directly above the entrance and is connected to it by a for="" attributes that contain the input ID.

ARIA Landmarks

These are easy to add and categorize regions on your site in blocks:

ARIA landmarks categorize your regions on your site.

You can add these simply by adding one role attributes to your div tags:

  ... 

Make elements invisible to screen readers

If something bothers a screen reader but needs to be on your site, you can cut it out with aria-hidden attribute:

In addition, hidden HTML attributes and the CSS directive display: none will both cause an element to be invisible to screen readers. You want to make sure that the screen reader does not read HTML from places it should not be able to see.


Source link