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

Clarify boolean attribute behaviour is unchanged #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thedamon
Copy link

@thedamon thedamon commented Dec 21, 2022

The broad wording in a few places fails to draw attention to the fact that :[booleanAttr]="false" will be removed from markup, as in Vue 2 (further confusing because @vue/compat incorrectly warned about this issue for boolean attributes until a recent fix). I added a few clarifications to make sure it's clear that this is specifically a change to non-boolean attributes.

I also removed the low-level internal API change label, because I think it is untrue that this won't affect most developers. HTML attributes changing from not being present to being present with a value of"false", could easily have consequences, especially somewhat invisibly for screen-readers, for attributes like aria-label, aria-labelledby, id, etc

For instance: with a binding like <label for="input">Email</label><input id="input" :aria-label="needsCustomAriaLabel && makeAriaLabel(input)"> the label of the input for a screenreader will change from "Email" to "false" between vue 2 and 3)

The broad wording in a few places fails to draw attention to the fact that `:booleanAttr="false"` will be removed from markup, as in Vue 2. I added a few clarifications to make sure it's clear that this is specifically a change to non-boolean attributes.

I also removed the `low-level internal API change` label, because I think it is untrue that this won't affect most developers. HTML attributes changing from not being present to being present with a value of`"false"`, could easily have consequences, especially somewhat invisibly for screen-readers, for attributes like `aria-label`, `aria-labelledby`, `id`, etc

For instance: with a binding like `<label for="input">Email</label><input id="input" :aria-label="needsCustomAriaLabel && makeAriaLabel(input)">` the label of the input for a screenreader will change from "Email" to "false" between vue 2 and 3)
@netlify
Copy link

netlify bot commented Dec 21, 2022

Deploy Preview for eager-kowalevski-41f498 ready!

Name Link
🔨 Latest commit b0ca79d
🔍 Latest deploy log https://app.netlify.com/sites/eager-kowalevski-41f498/deploys/63a344310d5813000850e9e1
😎 Deploy Preview https://deploy-preview-31--eager-kowalevski-41f498.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

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

Successfully merging this pull request may close these issues.

1 participant