This content originally appeared on DEV Community and was authored by Carlos Espada
The first step to achieve an accessible website is to use the right HTML element at all times. Try to write a code that reflects the structure of your information, do not stay in a simple set of <div>
and <span>
which you will later style with CSS.
For example, if you want to make a button, don't simulate its behavior with a <div>
that you fill in with CSS and JS to achieve what the browser already gives you natively. The browser can already do a lot of your work if you use <button>
.
To find out how accessible each element of HTML5 is, you can use HTML5 Accessibility, which is up-to-date and offers very reliable information.
If the HTML that you deliver to the browser has a meaning, that will help any type of device to understand it and offer the user the best experience, and that includes a computer, a mobile phone, a tablet, a screen reader, a voice recognition software, a watch ...
Remember, accessibility starts with semantics.
This content originally appeared on DEV Community and was authored by Carlos Espada
Carlos Espada | Sciencx (2021-12-14T07:41:51+00:00) A11y tips: the right element. Retrieved from https://www.scien.cx/2021/12/14/a11y-tips-the-right-element/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.