Skip to content

Commit 2e9146b

Browse files
committed
Add note about object class names
1 parent 0cf90bd commit 2e9146b

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

patterns/indexes.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ An index can be any of the three kinds of HTML list.
3232

3333
You can **never** have **any** other kind of index.
3434

35+
#### HTML classes
36+
37+
An index usually has an [object type class](../class-taxonomy#types): `work index group`, `assignment index group`, `reading index group`.
38+
39+
These class names should almost always be singular. The main exception to this is tags: `tags index group`.
40+
41+
If you find a plural other than `tags`, it's probably a mistake that needs to be corrected.
42+
3543
### dl.index
3644

3745
`dl.index` is sometimes used to display simple paired data (e.g. on a [translated news post](https://archiveofourown.org/admin_posts/148)), but it more often functions as a sort of brief alternative to showing a full blurb (or a full list of blurbs).

patterns/listbox.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,14 @@ The following diagram is taken from [an index of fandoms for a specific media ty
101101
</ol>
102102
</div>
103103

104+
### HTML classes
105+
106+
A listbox usually has an [object type class](../class-taxonomy#types): `work listbox group`, `assignment listbox group`, `reading listbox group`.
107+
108+
These class names should almost always be singular. The main exception to this is tags: `tags index group`.
109+
110+
If you find a plural other than `tags`, it's probably a mistake that needs to be corrected.
111+
104112
## Notes
105113

106114
We call it listbox (instead of indexbox) because a listbox might be a dynamically inserted form or form component, and therefore would need managed focus. This seems most closely related to [the ARIA role listbox](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/listbox_role).

0 commit comments

Comments
 (0)