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

SVG-AAM: Consider explicit language regarding inclusion of elements with child title or desc #134

Closed
joanmarie opened this issue Jan 6, 2016 · 7 comments

Comments

@joanmarie
Copy link
Contributor

According to section 5.1.2:

SVG user agents MUST provide an accessible object in the accessibility tree for rendered SVG elements that meet any of the following criteria:

  • It has at least one direct child ‘title’ element or ‘desc' element.
    ...

Subsequent items explicitly state "non-empty". As a result, one might assume the above text means user agents MUST expose elements with a direct child title/desc -- even if the contents of that title/desc element is empty. Then again, if the provided title/desc is empty and there are no other criteria met justifying inclusion, why should there be an accessible object for the parent? (Not entirely rhetorical.)

Regardless of whether the statement quoted above applies always or only in the case of non-empty title/desc element children, I think it would be helpful if there were explicit language clarifying what implementors should do.

@richschwer
Copy link
Contributor

good point. We will discuss it at meetings. I see you assigned it to Fred for now.

@joanmarie
Copy link
Contributor Author

@richschwer Actually, I didn't assign it. I had assigned the other issue (#133) to him. Then he told me that was fine, but he wouldn't be the one to fix it as he wasn't working on that particular area. As a result, I've stopped assigning for now. ;) (The other one I assigned to you as a correction.)

@richschwer
Copy link
Contributor

no problem. As long as we have an issue logged in tracker. This is a good one.

@joanmarie
Copy link
Contributor Author

A somewhat-related question to this issue (and/or issue 136): Given

<svg>
  <circle aria-labelledby="" cx="50" cy="100" r="15"/>
</svg>

Were there not the aria-labelledby, the circle element would not be exposed according to the last non-note section in 5.1.1 Excluding Elements from the Accessibility Tree.

Were there a non-empty aria-labelledby, then that would of course be cause for exposure of the circle element.

But what should happen in the case of an empty aria-labelledby attribute and no other semantic information justifying exposure as shown in the example above?

Regardless of what the answer is, perhaps some explicit language to address this would be of use.

Lastly, if the group consensus is to not include the circle element, the work-in-progress test assertions should probably be updated to remove the following assertion:

// empty aria-labelledby only
if given <circle id="test" aria-labelledby="" cx='50' cy='100' r='15'/> then accessible name = BLANK

because one cannot test the name of a non-exposed element.

@fredesch
Copy link

SVG 2 doc and/or SVG AAM will be updated to reflect empty or whitespace only title/desc nullifies the affect of having a title/desc child.

@AmeliaBR
Copy link
Contributor

The text I've pushed in the svg-aam branch requires that

  • user agents MUST include elements with non-empty title, desc, or aria labelling attributes
  • user agents MAY include elements that have title, desc, or the aria labelling attributes without first checking that they are non-empty (or valid IDREFs, in the case of labelledby/describedby)

Of course it would be a better user experience if elements with empty labels are not included solely on account of the empty attribute or child element. However, I'm not willing to make that a "MUST", especially since we only use "SHOULD" for excluding shapes without labels, anyway.

Corresponding edits to SVG 2 will make it clear that title and desc should never be empty or whitespace-only. I'm not sure if similar edits are required for aria-label(requiring that it not be present but empty) in the ARIA spec.

@AmeliaBR
Copy link
Contributor

AmeliaBR commented Aug 1, 2017

Cleaning up old issues. This should have been closed last year.

#373 took care of the edits to the SVG-AAM.

The "Corresponding edits to SVG 2" resulted in the following text:

Inclusion of any 'title' or 'desc' elements as a direct child of a rendered element indicates that the rendered element is of semantic importance in the graphic. Authors should not, and SVG generators must not, include empty 'title' or 'desc' elements with no text content or whitespace-only text content, as this will result in a nameless object being presented to assistive technology users.


If there is a need to add requirements on aria-label and aria-labelledby to prevent empty strings as accessible names, that should be a separate issue, as it would not be SVG specific.

@AmeliaBR AmeliaBR closed this as completed Aug 1, 2017
pkra pushed a commit that referenced this issue May 20, 2024
* Add mapping for aria-braillelabel and aria-brailleroledescription
* Add note to aria-brailleroledescription for "not mapped"
pkra pushed a commit that referenced this issue May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants