Skip to content

Change tooltip to name prohibited#2670

Open
scottaohara wants to merge 4 commits intomainfrom
tooltip-naming-change
Open

Change tooltip to name prohibited#2670
scottaohara wants to merge 4 commits intomainfrom
tooltip-naming-change

Conversation

@scottaohara
Copy link
Copy Markdown
Member

@scottaohara scottaohara commented Oct 30, 2025

🚀 Netlify Preview:
🔄 this PR updates the following sspecs:

this PR attempts to close #2668

As mentioned in the referenced issue, authors naming a tooltip either doesn't consistently work with current AT, or it can introduce unintended author errors where if a tooltip is named - and associated with an element via aria-describedby, only the name is exposed and not the longer description that a user can see.

The reason this changed to name prohibited, is because by removing the 'name from author', only 'name from contents' remained.... and there is no other role in the ARIA spec that allows name from content by itself. All other similar roles are identified as name prohibited.

So, while this PR initially only changes the "name from" section from listing "author and contents" to "prohibited" - i assume a note will need to be added to further describe this change and the rational behind it.

it might be worth also resolving #2507 in this PR. but before I do that, I will wait for discussion on this initial PR.

Test, Documentation and Implementation tracking

Once this PR has been reviewed and has consensus from the working group, tests should be written and issues should be opened on browsers. Add N/A and check when not applicable.


Preview | Diff

this PR attempts to close #2668

As mentioned in the referenced issue, authors naming a tooltip either doesn't consistently work with current AT, or it can introduce unintended author errors where if a tooltip is named - and associated with an element via `aria-describedby`, only the name is exposed and not the longer description that a user can see.

The reason this changed to name prohibited, is because by removing the 'name from author', only 'name from contents' remained.... and there is no other role in the ARIA spec that allows name from content by itself. All other similar roles are identified as name prohibited.


So, while this PR initially only changes the "name from" section from listing "author and contents" to "prohibited"  - i assume a note will need to be added to further describe this change and the rational behind it.

it might be worth also resolving #2507 in this PR.  but before I do that, I will wait for discussion on this initial PR.
@netlify
Copy link
Copy Markdown

netlify bot commented Oct 30, 2025

Deploy Preview for wai-aria ready!

Name Link
🔨 Latest commit e497f42
🔍 Latest deploy log https://app.netlify.com/projects/wai-aria/deploys/69b1aa5f50ba7c00085a9ecb
😎 Deploy Preview https://deploy-preview-2670--wai-aria.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 project configuration.

@jnurthen jnurthen requested a review from Copilot November 10, 2025 07:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the tooltip role definition to prohibit accessible naming, changing the "Name From" characteristic from allowing "contents" and "author" to "prohibited".

  • Changed the tooltip role's "Name From" value from a list containing "contents" and "author" to "prohibited"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Member

@adampage adampage left a comment

Choose a reason for hiding this comment

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

Ship it. 🚀

scottaohara and others added 2 commits December 4, 2025 16:23
Added prohibited states and properties section to the table.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 26, 2026

🚀 Deployed on https://deploy-preview-2670--wai-aria.netlify.app

@github-actions github-actions bot temporarily deployed to pull request February 26, 2026 18:54 Inactive
@pkra
Copy link
Copy Markdown
Member

pkra commented Feb 27, 2026

roleInfo check diff looks good:

diff --git a/common/script/roleInfo.js b/common/script/roleInfo.js
index 852d7af..937e31e 100644
--- a/common/script/roleInfo.js
+++ b/common/script/roleInfo.js
@@ -7970,7 +7970,29 @@
     name: "tooltip",
     fragID: "tooltip",
     parentRoles: ["section"],
-    localprops: [],
+    localprops: [
+      {
+        is: "property",
+        name: "aria-braillelabel",
+        required: false,
+        disallowed: true,
+        deprecated: false,
+      },
+      {
+        is: "property",
+        name: "aria-label",
+        required: false,
+        disallowed: true,
+        deprecated: false,
+      },
+      {
+        is: "property",
+        name: "aria-labelledby",
+        required: false,
+        disallowed: true,
+        deprecated: false,
+      },
+    ],
   },
   tree: {
     name: "tree",

@pkra pkra moved this to Reviewed, other needs in ARIA Normative PR Tracking Feb 27, 2026
@github-project-automation github-project-automation bot moved this to Agenda+ in ARIA Editors Feb 27, 2026
@github-actions github-actions bot temporarily deployed to pull request March 11, 2026 17:44 Inactive
@pkra pkra removed this from ARIA Editors Mar 11, 2026
@pkra
Copy link
Copy Markdown
Member

pkra commented Mar 11, 2026

Discussed at today's editors meeting https://www.w3.org/2026/03/11-aria-editors-minutes.html#7e86

@spectranaut
Copy link
Copy Markdown
Contributor

We have three approving reviews, so I believe we now need tests and bugs on browser to update whether the name/description can come from the author provided name on a tooltip within the accname algorithm.

@spectranaut
Copy link
Copy Markdown
Contributor

Also we should open bugs on validators.

@spectranaut
Copy link
Copy Markdown
Contributor

@scottaohara @smhigley Actually when I started to write a bug reports -- I realized I'm confused. Should this markup work, where the description on the button is "This button does nothing"?

    <button aria-describedby=tooltip>Click Me</button>
    <span role=tooltip id=tooltip class=box aria-label=misleading>This button does nothing.</span>

If so, doesn't something need to change in the accname algorithm? Because if name is prohibited on tooltip won't force the accname algorithm to skip over aria-label and just compute the name from content.

@scottaohara
Copy link
Copy Markdown
Member Author

@spectranaut i guess that depends on what we want to have happen here?

previously when making generics name prohibited we did not immediately make changes to actually disallow or undo the naming of those generics. it was instead a change in author requirements.

if, however, we want to go and fully undo / prevent the naming of tooltips, then i'd say that's beyond merely prohibiting. which i'm not opposed to, but it was beyond the original intent of this PR which was to stop telling authors they could do something which did not consistently work / was not consistently respected by AT

@spectranaut
Copy link
Copy Markdown
Contributor

spectranaut commented Mar 19, 2026

Ok I now understand, "name: prohibited" should just cause an author error, in validators, and not effect browsers calculation of the name. And I verified in firefox and chrome -- if I replace the tooltip in the example above with any name from prohibited thing, and their is an aria-label on it, the aria-label is used.

However, the first step of the acc name algorithm says:

Initialization: Set the root node to the given element, the current node to the root node, and the total accumulated text to the empty string (""). If the root node's role prohibits naming, return the empty string ("").

It is says "If the root node's role prohibits naming" -- so name prohibited, according to the accname algorithm... should effect whether the browser calculates a name?? Am I missing something??

This is on today's agenda to ask:

  • Does this need ACT review or can we just open issues on validators and mdn and then merge?

@css-meeting-bot
Copy link
Copy Markdown
Member

The ARIA Working Group just discussed Change tooltip to name prohibited.

The full IRC log of that discussion <Zakim> agendum 6 -- -> Change tooltip to name prohibited https://github.com//pull/2670 -- taken up [from agendabot]
<pkra> spectranaut_: scott could you take a look at my comment?
<pkra> zakim, end meeting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Reviewed, other needs

Development

Successfully merging this pull request may close these issues.

Should tooltips allow name from author - or really, naming?

9 participants