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

ABBR: remove title #18409

Merged
merged 8 commits into from
Jul 19, 2022
Merged

ABBR: remove title #18409

merged 8 commits into from
Jul 19, 2022

Conversation

estelle
Copy link
Member

@estelle estelle commented Jul 16, 2022

Summary

The title attribute is not recommended on ABBR. See https://www.tpgi.com/short-note-the-abbreviation-appreciation-society/, but can be used when an expansion of the abbreviation for all users to see is not possible. It is NOT needed when the acronym is obvious, such as on the MDN acronym on MDN.

The title attribute page was missing some features (LINK element), incorrect in some areas (should not be used on INPUT), and referenced deprecated elements (MENUITEM), so I edited that page a little more in-depth.

* for required is not an abbreviation or acronym. Edited that.

Motivation

Supporting details

https://www.tpgi.com/short-note-the-abbreviation-appreciation-society/

Related issues

PArt of openwebdocs/project#115

Metadata

  • Adds a new document
  • Rewrites (or significantly expands) a document
  • Fixes a typo, bug, or other error

@estelle estelle requested review from a team as code owners July 16, 2022 06:20
@estelle estelle requested review from schalkneethling and Rumyra and removed request for a team July 16, 2022 06:20
@estelle estelle marked this pull request as draft July 16, 2022 06:20
@github-actions github-actions bot added Content:Accessibility Accessibility docs Content:Learn Learning area docs Content:HTML Hypertext Markup Language docs labels Jul 16, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jul 16, 2022

Preview URLs

Flaws

Note! 5 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/Accessibility/ARIA/Roles
Title: WAI-ARIA Roles
on GitHub
Flaw count: 2

  • macros:
    • /en-US/docs/Web/HTML/Element/h1 redirects to /en-US/docs/Web/HTML/Element/Heading_Elements
    • /en-US/docs/Web/HTML/Element/h6 redirects to /en-US/docs/Web/HTML/Element/Heading_Elements

URL: /en-US/docs/Web/HTML/Element/abbr
Title: <abbr>: The Abbreviation element
on GitHub
Flaw count: 1

  • macros:
    • wrong xref macro used (consider changing which macro you use)

URL: /en-US/docs/Learn/Accessibility/CSS_and_JavaScript
Title: CSS and JavaScript accessibility best practices
on GitHub
Flaw count: 2

  • broken_links:
    • Can't resolve /en-US/docs/Web/API/GlobalEventHandlers/onclick
    • Link points to the page it's already on

URL: /en-US/docs/Learn/HTML/Introduction_to_HTML/Advanced_text_formatting
Title: Advanced text formatting
on GitHub
Flaw count: 1

  • broken_links:
    • Link points to the page it's already on

URL: /en-US/docs/Learn/Forms/Form_validation
Title: Client-side form validation
on GitHub
Flaw count: 4

  • macros:
    • /en-US/docs/Web/API/ValidityState/valueMissing does not exist
    • /en-US/docs/Web/API/ValidityState/customError does not exist
  • broken_links:
    • Can't resolve /en-US/docs/Web/HTML/Attributes/novalidate
    • Link points to the page it's already on

URL: /en-US/docs/Learn/Forms/How_to_structure_a_web_form
Title: How to structure a web form
on GitHub
Flaw count: 3

  • macros:
    • /en-US/docs/Web/HTML/Element/h1 redirects to /en-US/docs/Web/HTML/Element/Heading_Elements
    • /en-US/docs/Web/HTML/Element/h2 redirects to /en-US/docs/Web/HTML/Element/Heading_Elements
  • broken_links:
    • Link points to the page it's already on

External URLs

URL: /en-US/docs/Web/Accessibility/ARIA/Attributes
Title: ARIA states and properties
on GitHub

No new external URLs


URL: /en-US/docs/Web/Accessibility/ARIA/Roles
Title: WAI-ARIA Roles
on GitHub

No new external URLs


URL: /en-US/docs/Web/Accessibility/ARIA/Roles/window_role
Title: ARIA: window role
on GitHub

No new external URLs


URL: /en-US/docs/Web/Accessibility/ARIA/Roles/toolbar_role
Title: ARIA: toolbar role
on GitHub


URL: /en-US/docs/Web/HTML/Global_attributes/title
Title: title
on GitHub

No new external URLs


URL: /en-US/docs/Web/HTML/Element/abbr
Title: <abbr>: The Abbreviation element
on GitHub

No new external URLs


URL: /en-US/docs/Learn/Accessibility/CSS_and_JavaScript
Title: CSS and JavaScript accessibility best practices
on GitHub

No new external URLs


URL: /en-US/docs/Learn/HTML/Introduction_to_HTML/Advanced_text_formatting
Title: Advanced text formatting
on GitHub

No new external URLs


URL: /en-US/docs/Learn/Forms/Form_validation
Title: Client-side form validation
on GitHub

No new external URLs


URL: /en-US/docs/Learn/Forms/How_to_structure_a_web_form
Title: How to structure a web form
on GitHub

No new external URLs


URL: /en-US/docs/Learn/Forms/How_to_structure_a_web_form/Example
Title: Example
on GitHub

No new external URLs

(this comment was updated 2022-07-19 20:30:33.192262)

@estelle estelle marked this pull request as ready for review July 16, 2022 21:08
Copy link
Contributor

@teoli2003 teoli2003 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! A few nits and some questions!

@@ -525,7 +527,7 @@ solution.addEventListener('click', function() {
updateCode();
});

const htmlSolution = '<p><abbr title="National Aeronautics and Space Administration">NASA</abbr> sure does some exciting work.</p>';
const htmlSolution = '<p><abbr>NASA</abbr>, the National Aeronautics and Space Administration, sure does some exciting work.</p>';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious, will screen readers read this as N – A – S – A or as Nasa?

If they do the first, how should we mark up our content to prevent this?

@@ -10,9 +10,9 @@ tags:
- States
- Properties
---
This page lists reference pages covering all the WAI-ARIA attributes discussed on MDN.
This page lists reference pages covering all the <abbr>WAI-ARIA</abbr> attributes discussed on <abbr>MDN</abbr>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strictly speaking, MDN is no more an abbreviation for Mozilla Developer Network, like IBM is no more an abbreviation for International Business Machines.

files/en-us/web/html/element/abbr/index.md Outdated Show resolved Hide resolved
files/en-us/web/html/element/abbr/index.md Outdated Show resolved Hide resolved
Additional semantics are attached to the `title` attributes of the {{HTMLElement("link")}}, {{HTMLElement("abbr")}}, {{HTMLElement("input")}}, and {{HTMLElement("menuitem")}} elements.
The `title` attribute, when added to [`<link rel="stylesheet">`](/en-US/docs/Web/HTML/Element/link), creates an alternate stylesheet. When defining an alternative style sheet with `<link rel="alternate">` the attribute is required and must be set to a non-empty string.

While `title` can be used to provide a programmatically associated label for an {{HTMLElement("input")}} element, this is not good practice. Use a {{HTMLElement("label")}} instead.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should list the <abbr>case here, too.

estelle and others added 2 commits July 19, 2022 12:49
Co-authored-by: Jean-Yves Perrier <jypenator@gmail.com>
Copy link
Contributor

@teoli2003 teoli2003 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@teoli2003 teoli2003 merged commit 615d347 into mdn:main Jul 19, 2022
@estelle estelle deleted the semantics-3 branch July 19, 2022 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:Accessibility Accessibility docs Content:HTML Hypertext Markup Language docs Content:Learn Learning area docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants