nlbdev / mathml-guidelines

A collaboration on the MathML guidelines for marking up accessible math
1 stars 1 forks source link

Explain the effect of <mrow> on parentheses #26

Open samimaattaCelia opened 5 months ago

samimaattaCelia commented 5 months ago

<mrow> is the element, which causes the parentheses (or other similar) to stretch to encompass the whole expression when needed.

Example of the rendering of the binomial when <mrow> is used correctly and below when it's not used at all: Screencap of two binomials of n over k.

Lisahartun commented 2 months ago

Does it make a difference for a blind person? If it is one way or the other? Of course, they should use it correctly.

samimaattaCelia commented 2 months ago

As we discussed in the meeting, this might be a case of proper markup vs. effort put into achieve this.

Do we think that requiring here would be too challenging and also challenging to validate for? I don't know if this passes MathML validation. If it does, then this could be an easy thing to add to the validator. The parentheses are important also in fractions and such for proper rendering.

samimaattaCelia commented 1 month ago

Same with matrices: kuva kuva

Code with <mrow>:

<math>
  <mfrac>
    <mi>A</mi>
    <mn>2</mn>
  </mfrac>
  <mo>=</mo>
  <mrow>
    <mo>(</mo>
    <mtable>
      <mtr>
        <mtd><mn>1</mn></mtd>
        <mtd><mn>2</mn></mtd>
        <mtd><mn>3</mn></mtd>
      </mtr>
      <mtr>
        <mtd><mn>4</mn></mtd>
        <mtd><mn>5</mn></mtd>
        <mtd><mn>6</mn></mtd>
      </mtr>
      <mtr>
        <mtd><mn>7</mn></mtd>
        <mtd><mn>8</mn></mtd>
        <mtd><mn>9</mn></mtd>
      </mtr>
    </mtable>
    <mo>)</mo>
  </mrow>
</math>