-
Hajipur, Bihar, 844101
HTML Accessibility means designing and coding web pages so that all users, including those with disabilities (like visual, auditory, motor, or cognitive impairments), can easily access, understand, and interact with content.
Accessibility follows WCAG (Web Content Accessibility Guidelines) and promotes the idea of an inclusive web.
Legal compliance (e.g., ADA, Section 508)
Better user experience for everyone
Improves SEO and usability
Makes web content available to screen readers, keyboard-only users, and others with assistive technologies
Use meaningful elements like <header>
, <nav>
, <main>
, <section>
, <footer>
, etc.
<header>
<h1>Welcome to My Site</h1>
</header>
<img src="logo.png" alt="Company Logo" />
Avoid empty alt=""
unless the image is decorative.
<label for="email">Email Address:</label>
<input type="email" id="email" name="email" />
Use tabindex
, avoid onclick
without a fallback, and ensure all interactive elements are reachable via keyboard.
Use role
, aria-label
, aria-hidden
, etc., where needed:
<div role="alert">Form submission failed</div>
Structure content with headings (<h1>
to <h6>
) in a logical order.
Include caption
, thead
, tbody
, and scope
:
<table>
<caption>Employee Data</caption>
<thead>
<tr><th scope="col">Name</th><th scope="col">Role</th></tr>
</thead>
<tbody>
<tr><td>Alice</td><td>Developer</td></tr>
</tbody>
</table>
Q1. Create a form with properly labeled input fields.
Q2. Add an image with descriptive alt text.
Q3. Convert a non-semantic layout into semantic HTML5 structure.
Q4. Use ARIA attributes to make a custom button accessible.
Q5. Create a table with captions and scope attributes.
Q6. Demonstrate keyboard navigation using tabindex
.
Q7. Write an alert message using role="alert"
.
Q8. Build a navigation bar that is accessible for screen readers.
Q9. Write an accessible modal dialog example.
Q10. Fix accessibility issues in a sample form (missing labels, improper inputs).
Q1: What does alt attribute in <img> tag do?
Q2: What HTML element is used to describe a table?
Q3: Which attribute improves screen reader understanding of custom components?
Q4: What does role="alert" do?
Q5: Which HTML tag is not semantic?
Q6: What should you use to make a custom button keyboard-accessible?
Q7: How can users without a mouse access web pages?
Q8: What does tabindex="0" mean?
Q9: ARIA stands for:
Q10: What is the first step toward making a site accessible?