Opened 8 years ago
Closed 8 years ago
#16373 closed Bug (fixed)
AVT: Title for all icons in CK Editor dialogs not displayed for Keyboard only User
Reported by: | Satya Minnekanti | Owned by: | Marek Lewandowski |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Accessibility | Version: | 4.0 |
Keywords: | IBM | Cc: | Irina |
Description
Steps to reproduce
- Open nightly build.
- Open a dialogs that has icons (ex: Smileys)
- Navigate to each smiley icon using TAB key (keyboard only user).
Issue: Label for each smiley not displayed for Keybaord only user. This is violation of AVT Checkpoint Checkpoint 2.1.1 Keyboard http://www-03.ibm.com/able/guidelines/ci162/keyboard.html
Same issue happens with icons in Special Character dialog, also Lock Ratio & Reset size icons in Image Properties dialog.
This fix should apply to any focusable icons in any dialogs i may have missed mentioning here.
This is same issue as defect #14931
Attachments (2)
Change History (10)
comment:1 Changed 8 years ago by
Status: | new → confirmed |
---|---|
Version: | → 4.0 |
comment:2 Changed 8 years ago by
Owner: | set to Tade0 |
---|---|
Status: | confirmed → assigned |
comment:3 Changed 8 years ago by
comment:4 Changed 8 years ago by
Owner: | changed from Tade0 to Marek Lewandowski |
---|---|
Status: | assigned → review |
Unfortunately this issue required some heavy refactoring, and we couldn't get away with a simplified plugin. With this in addition to adding tooltips for following dialogs:
- special chars
- smileys
- image
- image2
We were able to add integration for things like reposition the tooltips dialog move or window resize.
Pushed to branch:t/16373 (which is on top of branch:t/14931).
comment:5 Changed 8 years ago by
Status: | review → review_failed |
---|
Overall it is a good and solid solution. Few things I have noticed:
Tests:
- Unit tests http://tests.ckeditor.dev:1030/tests/plugins/keyboardtooltip/colorbuttonintegration fails on all browsers (probably were not adjusted after refactoring).
- No unit tests for dialog tooltips (we can add some if it is possible and seems reasonable).
Functionality:
- I think we may consider two labels for image/image2 lock ratio button while it has two states - locked/unlocked, but the tooltip is the same no matter the state. Unless ofc we consider the tooltip to show more like a button name not a state/action which it may trigger.
- Some tooltips for special chars in special chars dialog have text/value like
"e;
(see screenshot) where others have regular names. Maybe we should try to make it consistent and more user friendly (it is probably a Special chars dialog issue, not akeyboardtooltip
plugin itself but maybe it can be fixed?).
Code: Looks good :)
From readability point of view, there is a shadowTitle
function which is basically a function adding tooltips (or kind of a proxy to CKEDITOR.plugins.keyboardtooltip.addTooltip
). It is used as a main way to add tooltips, but the function itself has a not so obvious name and is hidden on the end of the code of a whole plugin which makes it a little harder to understand.
You may also consider a little refactoring in offset helper to not duplicate the code, like:
offset: { left: function( elem ) { return this.calculateOffset( elem, 'offsetLeft' ); }, top: function( elem ) { return this.calculateOffset( elem, 'offsetTop' ); }, bottom: function( elem ) { return this.calculateOffset( elem, 'offsetTop', elem.offsetHeight ); }, calculateOffset: function( elem, offsetType, initValue) { var offset = initValue || 0; do { if ( !isNaN( elem[ offsetType ] ) ) { offset += elem[ offsetType ]; } } while ( elem = elem.offsetParent ); return offset; } },
Changed 8 years ago by
Attachment: | Screen Shot 2016-11-24 at 08.36.41m.png added |
---|
Changed 8 years ago by
Attachment: | Screen Shot 2016-11-24 at 08.40.34m.png added |
---|
comment:6 Changed 8 years ago by
Status: | review_failed → review |
---|
Tests:
- fixed failing unit test - actually there was missing one fallback in
shadowTitle
function which might reduce the accessibility. - I've added tests for dialogs integration.
Functionality:
I think we may consider two labels for image/image2 lock ratio button while it has two states - locked/unlocked, but the tooltip is the same no matter the state. Unless ofc we consider the tooltip to show more like a button name not a state/action which it may trigger.
Actually the problem here is the tooltip text. Since #7569(https://dev.ckeditor.com/ticket/7569) it works as a checkbox. As a checkbox it should indicate feature name, rather than what action will it take.
So instead "Lock ratio" it should be "Ratio lock" which can be turned on and off (indicated both by lock icon, and aria checkbox state for a11y).
Some tooltips for special chars in special chars dialog have text/value like "e; (see screenshot) where others have regular names. Maybe we should try to make it consistent and more user friendly (it is probably a Special chars dialog issue, not a keyboardtooltip plugin itself but maybe it can be fixed?).
Extracted to #16689.
Code: shadowTitle
agree that the name is wrong for reasons you have given, I've renamed it.
Changes repushed to t/16373.
comment:7 Changed 8 years ago by
Status: | review → review_passed |
---|
All tests passing, code looks good. LGTM!
comment:8 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
This feature will be merged to major in issue #16373.
I've added a prototype of tooltips for the specialchar dialog and put it in branch:t/14931a.
Things to do:
td:nth-last-child(1)
andtr:nth-last-child(1)
selectors - there's an example of this method in the plugin.:before
pseudoelement. The solution is to move thetitle
attr. to their parent elements and use theshadowTitle
method on that.