Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggested change to description of merror layout in core spec #66

Closed
NSoiffer opened this issue Mar 4, 2019 · 3 comments
Closed

Suggested change to description of merror layout in core spec #66

NSoiffer opened this issue Mar 4, 2019 · 3 comments
Labels
MathML 4 Issues affecting the MathML 4 specification need polyfill Issues requiring implementation changes need specification update Issues requiring specification changes

Comments

@NSoiffer
Copy link
Contributor

NSoiffer commented Mar 4, 2019

The core spec says this about merror:

The merror element displays its contents as an ”error message”. This might be done, for example, by displaying the contents in red, flashing the contents, or changing the background color.

For the layout algorithm described in this document, the merror element must be treated the same as the mrow element. The user agent stylesheet must set some CSS properties on the merror element in order to highlight the error. As suggested in section 2.3.2, this can for example be achieved with the rule:

merror {
outline: solid thin red;
background-color: lightYellow;
}

I think it would be useful (and conformant with the HTML5 spec) to indicate what the error is when the content is not a string of text describing the error. This would occur when an merror is created because of a content error such as the wrong number of arguments to msup. I see two possibilities:

  • Use the tittle attr so a tooltip comes up that explains the error ("wrong number of args to mfrac", etc).
  • Use aria-describedby and point off to a description of the error

I prefer the first solution although tittle has some accessibility issues. Those will hopefully go away in the future as screenreaders adopt to current standards.

@fred-wang
Copy link

As I say on https://github.com/mathml-refresh/mathml/issues/15#issuecomment-469589832 I don't think we should rely on merror's rendering to indicate invalid markup. Also report of errors is generally done via the developer console.

Finally, I guess you are right that maybe merror is not in core, I opened #70 ; if merror stays in core, then I would oppose any additional complexity (I don't understand where the attributes you suggest are coming from? users? generated?). Even the current suggested rendering might not work until we clarify #9

@davidcarlisle davidcarlisle added the MathML 4 Issues affecting the MathML 4 specification label Mar 30, 2019
@fred-wang fred-wang added need specification update Issues requiring specification changes need resolution Issues needing resolution at MathML Refresh CG meeting labels May 16, 2019
@fred-wang fred-wang added the need polyfill Issues requiring implementation changes label May 22, 2020
@fred-wang
Copy link

I think this is something for an "invalid markup" polyfill, so adding the label

@fred-wang fred-wang removed the need resolution Issues needing resolution at MathML Refresh CG meeting label Aug 12, 2020
@davidcarlisle
Copy link
Collaborator

Closing as no change needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MathML 4 Issues affecting the MathML 4 specification need polyfill Issues requiring implementation changes need specification update Issues requiring specification changes
Projects
None yet
Development

No branches or pull requests

3 participants