[wp-trac] [WordPress Trac] #44323: Insert/ Edit link: Checkbox missing association with Label
WordPress Trac
noreply at wordpress.org
Thu Jun 7 09:05:20 UTC 2018
#44323: Insert/ Edit link: Checkbox missing association with Label
--------------------------+-----------------------------
Reporter: anevins | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: TinyMCE | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
**Describe the bug**
The checkbox "Open link in a new tab" is not programmatically associated
with its label element. The label element is missing the 'for' attribute
that would match with the 'id' of the checkbox.
The DOM position of the checkbox (inside the label) does mean that users
can click on the label to interact with the checkbox, but this association
may not be clear to assistive technologies.
**To Reproduce**
Steps to reproduce the behavior:
1. Edit a page;
2. Press on the "Insert/ edit link" TinyMCE button;
3. Press on the cog "Link Options" icon;
4. A dialogue box appears titled "Insert/edit link".
5. See the source code of the "Open link in a new tab" checkbox.
![example](https://user-
images.githubusercontent.com/2318561/41049538-10a8ae78-69a9-11e8-9a33-242d67bd2b2a.png)
**Expected markup**
{{{
<label for="wp-link-target-0">
<input type="checkbox" id="wp-link-target-0">
Open link in a new tab
</label>
}}}
**Desktop (please complete the following information):**
- OS: Ubuntu
- Browser: Chrome
- Version: Latest
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44323>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list