Skip to content

Commit b8ff4af

Browse files
authored
Fix local anchor links (#5)
1 parent 18f857a commit b8ff4af

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ It’s worth noting that **HTML elements may factor in** according to the spec
9191

9292
### getElements()
9393

94-
Return all HTML elements that represent a given ARIA role, if any. If no HTML elements represent this role, `undefined` will be returned. This is essentially the inverse of [`getRole()`](#getrole--).
94+
Return all HTML elements that represent a given ARIA role, if any. If no HTML elements represent this role, `undefined` will be returned. This is essentially the inverse of [`getRole()`](#getrole).
9595

9696
```ts
9797
import { getBaseConcepts } from "html-aria";
@@ -199,11 +199,11 @@ Here are all the HTML elements where either attributes, hierarchy, or both are n
199199
| **td** | `cell`\| `gridcell` \|| ||
200200
| **th** | `columnheader` \| `rowheader` \||||
201201

202-
_Note: `` = [no corresponding role](#whats-the-difference-between-no-corresponding-role-and-the-none-role-)_
202+
_Note: `` = [no corresponding role](#whats-the-difference-between-no-corresponding-role-and-the-none-role)_
203203

204204
### aria-\* attributes from HTML
205205

206-
Further, a common mistake many simple accessibility libraries make is mapping aria-\* attributes to ARIA roles. While that _mostly_ works, there are a few exceptions where HTML information is needed. That is why [`getSupportedAttributes()`](#getsupportedattributes) takes an HTML element. Here is a full list:
206+
Further, a common mistake many simple accessibility libraries make is mapping aria-\* attributes to ARIA roles. While that _mostly_ works, there are a few exceptions where HTML information is needed. That is why [`getSupportedAttributes()`](#getsupportedattributes--issupportedattribute) takes an HTML element. Here is a full list:
207207

208208
| Element | Default Role | Notes |
209209
| :----------------------- | :----------: | :---------------------------------------------------------------------------------------- |
@@ -238,7 +238,7 @@ Further, a common mistake many simple accessibility libraries make is mapping ar
238238
| **video** || Accepts `application` aria-\* attributes by default |
239239
| **wbr** || No aria-\* attributes allowed EXCEPT `aria-hidden` |
240240

241-
_Note: `` = [no corresponding role](#whats-the-difference-between-no-corresponding-role-and-the-none-role-). Also worth pointing out that in other cases, [global aria-\* attributes](https://www.w3.org/TR/wai-aria-1.3/#global_states) are allowed, so this is unique to the element and NOT the ARIA role._
241+
_Note: `` = [no corresponding role](#whats-the-difference-between-no-corresponding-role-and-the-none-role). Also worth pointing out that in other cases, [global aria-\* attributes](https://www.w3.org/TR/wai-aria-1.3/#global_states) are allowed, so this is unique to the element and NOT the ARIA role._
242242

243243
### Technical deviations from the spec
244244

@@ -256,7 +256,7 @@ Since we have 1 spec and 1 browser agreeing, this library defaults to `graphics-
256256

257257
#### Ancestor-based roles
258258

259-
In regards to [ARIA roles in HTML](#aria-roles-in-html), the spec gives non-semantic roles to `<td>`, `<th>`, and `<li>` UNLESS they are used inside specific containers (`table`, `grid`, or `gridcell` for `<td>`/`<th>`; `list` or `menu` for `<li>`). This library assumes they’re being used in their proper containers without requiring the `ancestors` array. This is done to avoid the [footgun](https://en.wiktionary.org/wiki/footgun) of requiring missable configuration to produce accurate results, which is bad software design.
259+
In regards to [ARIA roles in HTML](#aria-roles-from-html), the spec gives non-semantic roles to `<td>`, `<th>`, and `<li>` UNLESS they are used inside specific containers (`table`, `grid`, or `gridcell` for `<td>`/`<th>`; `list` or `menu` for `<li>`). This library assumes they’re being used in their proper containers without requiring the `ancestors` array. This is done to avoid the [footgun](https://en.wiktionary.org/wiki/footgun) of requiring missable configuration to produce accurate results, which is bad software design.
260260

261261
Instead, the non-semantic roles must be “opted in” by passing an explicitly-empty ancestors array:
262262

@@ -299,7 +299,7 @@ In the spec, you’ll find language describing both roles and attributes in 4 ca
299299
3. **Unsupported, but not prohibited:** these are omitted both from supported and prohibited lists
300300
4. **Unsupported and prohibited:** explicitly [prohibited](https://www.w3.org/TR/wai-aria-1.3/#prohibitedattributes)
301301

302-
As stated in [Project Goals](#about), html-aria aims to not conflate non-normative recommendations as normative guidelines. So in the API, [getSupportedRoles()](#getsupportedroles--) and [getSupportedAttributes()](#getsupportedattributes--) will return 1 and 2, but not 3 or 4.
302+
As stated in [Project Goals](#about), html-aria aims to not conflate non-normative recommendations as normative guidelines. So in the API, [getSupportedRoles()](#getsupportedroles--issupportedrole) and [getSupportedAttributes()](#getsupportedattributes--issupportedattribute) will return 1 and 2, but not 3 or 4.
303303

304304
While there is a technical distinction between 3 and 4, for the purposees of html-aria they’re treated the same (because 3 specifically is not explicitly allowed, we can make a choice to read it as prohibited).
305305

0 commit comments

Comments
 (0)