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

Document changes in boolean attributes treatment #1243

Open
mgol opened this issue Mar 18, 2024 · 2 comments · May be fixed by #1263
Open

Document changes in boolean attributes treatment #1243

mgol opened this issue Mar 18, 2024 · 2 comments · May be fixed by #1263

Comments

@mgol
Copy link
Member

mgol commented Mar 18, 2024

See jquery/jquery#5452

@gibson042
Copy link
Member

The table in .attr( attributeName ) will need a new row for 4.0+, and .attr( attributeName, value ) will need updates to document the acceptability of a false value and its removal behavior which is similar to null behavior except with "aria-" attributes.

Proposed text for the latter:

Note: because ARIA attributes frequently associate behavior with "false" values that differs from attribute absence, passing false as the value for an attribute whose name starts with "aria-…" will stringify that value to "false" rather than remove the attribute. To guarantee removal of an attribute, provide null as the value or use the .removeAttr() method.

mgol added a commit to mgol/jquery-migrate that referenced this issue Oct 8, 2024
Restore & warn against:
* boolean attributes set to something different than their lowercase names
* boolean attributes queried when set to something different than their
  lowercase names
* non-boolean non-ARIA attributes set to `false`

Fixes jquerygh-504
Ref jquery/jquery#5452
Ref jquery/api.jquery.com#1243
@mgol
Copy link
Member Author

mgol commented Oct 9, 2024

PR: #1254

@mgol mgol linked a pull request Oct 14, 2024 that will close this issue
mgol added a commit to mgol/jquery-migrate that referenced this issue Oct 15, 2024
Restore & warn against:
* boolean attributes set to something different than their lowercase names
* boolean attributes queried when set to something different than their
  lowercase names
* non-boolean non-ARIA attributes set to `false`

Fixes jquerygh-504
Ref jquery/jquery#5452
Ref jquery/api.jquery.com#1243
mgol added a commit to mgol/jquery-migrate that referenced this issue Oct 28, 2024
Restore & warn against:
* boolean attributes set to something different than their lowercase names
* boolean attributes queried when set to something different than their
  lowercase names
* non-boolean non-ARIA attributes set to `false`

Fixes jquerygh-504
Ref jquery/jquery#5452
Ref jquery/api.jquery.com#1243
mgol added a commit to mgol/jquery-migrate that referenced this issue Oct 29, 2024
Restore & warn against:
* boolean attributes set to something different than their lowercase names
* boolean attributes queried when set to something different than their
  lowercase names
* non-boolean non-ARIA attributes set to `false`

Fixes jquerygh-504
Ref jquery/jquery#5452
Ref jquery/api.jquery.com#1243
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants