Skip to main content

Search and Top Navigation

#11272 closed bug (fixed)

Opened March 01, 2015 06:55PM UTC

Closed April 22, 2015 02:27PM UTC

Last modified April 22, 2015 02:27PM UTC

Tooltip: Content cannot contain checked radio button

Reported by: allenstyle Owned by:
Priority: minor Milestone: 1.12.0
Component: ui.tooltip Version: 1.11.2
Keywords: a11y Cc:
Blocked by: Blocking:


Today, I tried to show "ToolTip" by using html content.

It can display html well, but if I write down radio button in the html.

"ToolTip" cannot show checked radio button.

I goolged relative information, but I still cannot find any useful information.

Sample codes below:

                         items: 'a',
                         content: function () {
                            return $('#divContent').html();

<div id="divContent">
     <input type="radio" name="hobby" checked="checked" /><label>Option 1</label>
     <input type="radio" name="hobby" /><label>Option 2</label>

If anyone get any idea, please tell me.



Attachments (0)
Change History (8)

Changed March 01, 2015 08:56PM UTC by scottgonzalez comment:1

keywords: → a11y
status: newopen
summary: Cannot show checked radio button in the contentTooltip: Content cannot contain checked radio button

This happens because the live region gets a copy of the HTML, which results in the creation of more radio buttons, one of which is checked. The currently solution for just copying all the content and removing IDs is obviously flawed. I'm not really sure what we should do about that.

Changed March 19, 2015 01:47PM UTC by jiabao comment:2

Hello this is the first time I am using the jquery bug system.

It might be a good idea to fix this. Not just in the live region which is for readers but also the tooltip content both cause this issue with radio buttons.

To fix this I created a Pull Request modifying the _open function to strip name and id from both which required first passing the accepted content type into DOM objects. here is the PR -

Incase it is decided that this stripping of name and id from tooltips is merged I also created a pull request for the unit tests associated with this new feature. PR -

Thanks a lot if you take a look at the PRs, I think its good to try to make tooltip as isolated as possible from the rest of the DOM.

Changed March 24, 2015 07:14PM UTC by scottgonzalez comment:3

Pull requests need to be made against, not against your own fork. Please read

Changed March 25, 2015 06:43AM UTC by jiabao comment:4

Replying to [comment:3 scott.gonzalez]:

Pull requests need to be made against, not against your own fork. Please read

Thanks for your reply. I will work on that now. (Sorry I was following an out-dated guide.)

Changed March 31, 2015 02:05AM UTC by jiabao comment:5

I have updated the pull request to be made against,


Changed April 02, 2015 12:39PM UTC by scottgonzalez comment:6

Note that the use case presented in the ticket will not be supported. If you're effectively cloning content that's already in the document, it's your responsibility to make sure that content will work. However, there is a bug similar to the use case provided (where the markup is new, not cloned), because we copy the markup into the live region. Only the markup going into the live region will be cleaned up (and hopefully one day we can just get rid of it).

Changed April 22, 2015 02:27PM UTC by Jiabao Wu comment:7

resolution: → fixed
status: openclosed

Tooltip: Remove name attribute from elements in the live region

Fixes #11272

Closes gh-1544

Changeset: 2cef124bf27ce89f1fbfc493352ebfd895b40822

Changed April 22, 2015 02:27PM UTC by scottgonzalez comment:8

milestone: none1.12.0