Code Errors

Sample web page created with no semantic errors.
Figure 1 Example of webpage that is well-defined using native HTML elements along with ARIA implementation where required.

Usually, either HTML or ARIA or both CAN be used for defining elements on a webpage. However, due to inbuilt functionalities or baked in accessibility, native HTML is given precedence over ARIA for simple elements.

When dynamic or complex functionality appears, ARIA is preferred over native HTML or a mixture of both is used since it provides flexibility for developers.

The aim should be to ensure that through markup the name. role and value SHOULD be communicated appropriately for different assistive technologies.

NOTE:

  • New to accessibility or uncertain of requirements, it will be helpful to review all sections below.
  • Already familiar with requirements, skip to the “Working Example” section for sample HTML, CSS and JavaScript (when needed), along with a working demo.