-
Notifications
You must be signed in to change notification settings - Fork 12
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
Should the Accessibility mixin support <br/> as a formatting tag #685
Comments
Tagging @terracoda in case she has insight into |
@zepumph, in general in front-end development I would lean towards avoiding the use of |
@zepumph, can you explain why you think
For robust accessible descriptions, I think it is best to stick to html elements that provide semantic information about what the description: I am text in a paragraph, heading, list item, label, etc. I don't see a big need for |
Here's an interesting email discussion about carriage returns and screen readers announcing a new line.
|
I'm not against supporting HTML tags, I just do not see any use for the |
@terracoda thank you for the info. I will inform you how this came up in discussion with @jessegreenberg and myself, and we will proceed from there as to if this is a worth while path to go down. The current implementation of a11y descriptions onto a Node is currently very flushed out. There is quite a bit of flexibility as to what you can get that Node to look like in html. Most of these are straight forward, but I want to make sure I'm not confusing, so bare with me. A simple example: A Node that is a More complex new Node( {
tagName: 'el',
accessibleLabel: 'Unordered List',
labelTagName: 'h3',
accessibleDescription: 'I am an unordered list' } ); This will yield the following structure in html <ul> node
<h3> label
<p> description
<-- any children here --> Now another use case is that we want this Node to have a label, a description, and have children, just like above, but we want the label/description to be before the node, in which case we surround everything in a div and the html looks like: ```html
<div> surrounding div
<h3> label
<p> description
<ul> node
<-- any children here --> In this case it is sometimes nice to have a description tag with a bit more "power". Since we can't create other Final thoughts:
|
I don't think that br tag support is necessary, especially because of work in #686 |
Currently the mixin supports "formatting" tags that can be added to strings and rendered as html, but there is only a white list supported to prevent xss.
Questions
br
tags so that individualp
tags like the accessibleDescription can be more complex and powerful.br
tags? We should do a jsfiddle to experiment with them inside tags that support textContent likep
and headers(?).The text was updated successfully, but these errors were encountered: