Skip to content

Commit f1e3f13

Browse files
Refine the markup on labeling
Based on the markup of making tables keyboard-scrollable: https://adrianroselli.com/2017/11/a-responsive-accessible-table.html#ResponsiveScrollingKeyboard This needs to be tested.
1 parent 0327785 commit f1e3f13

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

Guidelines/Nordic MathML Guidelines 2024-1.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -613,15 +613,13 @@ Notice that `columnspan` is written this way, because of backwards compatability
613613

614614
### Labeling and referencing equations
615615

616-
**Open question**: Should we have standard spacing with `<mspace>`?
617-
618616
It is common to label equations and then reference these equations later on in mathematical text.
619617

620618
Example markup for a block equation with a label:
621619

622620
```html
623-
<div class="equation-wrapper">
624-
<math display="block" id="eq-1-3">
621+
<div role="region" class="equation-wrapper" tabindex="0" aria-labelledby="label-1-3" id="eq-1-3">
622+
<math display="block">
625623
<mo>(</mo>
626624
<mi>a</mi>
627625
<mo>∘<!----></mo>
@@ -638,17 +636,23 @@ Example markup for a block equation with a label:
638636
<mi>c</mi>
639637
<mo>)</mo>
640638
<mspace width="5em">
641-
<mtext>(1.3)</mtext>
639+
<mtext id="label-1-3">(1.3)</mtext>
642640
</math>
643641
</div>
644642
```
645643

646-
It is required that a labeled equation has
647-
- a `<div>` wrapper with the class `equation-wrapper`
648-
- the `<math>` has the attribute `display="block"`
649-
- an ID based on the `<mtext>` label and the ID is in the `<math>` element
650-
- `<mspace>` for spacing before the label
651-
- label in `<mtext>`.
644+
It is required that a labeled block equation has a `div` parent with the attributes
645+
- `class="equation-wrapper"`
646+
- `role="region"`
647+
- `tabindex="0"`
648+
- `aria-labelledby`, where referenced `id` is the `<mtext>` **label's** `id`.
649+
- `id` that is based on the `<mtext>` label
650+
651+
These requirements also hold for the labeled block equation:
652+
- the `<math>` element has the attribute `display="block"`
653+
- the label of the equation is in the `<mtext>` element and the `<mtext>` element has an `id` that is based on the `<mtext>` content
654+
- `<mspace>` for spacing between the equationa and the label
655+
- label is in the `<mtext>`.
652656

653657
**Note** that the element `<mlabeledtr>` is not allowed to use for labeling.
654658

0 commit comments

Comments
 (0)