ARIA (Accessible Rich Internet Applications) là tập hợp attributes bổ sung accessibility cho HTML khi semantic không đủ. 3 loại:
- Roles — xác định vai trò (
role="button",role="dialog"). - States — trạng thái (
aria-expanded="true",aria-disabled). - Properties — thuộc tính (
aria-label,aria-describedby)
Nguyên tắc: dùng native HTML trước, ARIA là giải pháp cuối cùng.
ARIA (Accessible Rich Internet Applications) is a set of attributes that add accessibility to HTML when native semantics are insufficient. 3 categories:
- Roles — define purpose (
role="button",role="dialog"). - States — current state (
aria-expanded="true",aria-disabled). - Properties — characteristics (
aria-label,aria-describedby)
Rule: use native HTML first; ARIA is the last resort.