? Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
16 Feb 2019

The aria-described-by was in the wrong place and there was an unneeded title attribute

This was reported by @zwiastunsw #23896

I am working through the fields

fields included so far

  • list
  • number
  • text
  • textarea
  • calendar
  • url
  • tel
  • email
  • range
  • accesslevel
  • combo

NOTE - this change will need to be done for all field layouts even if core doesnt have any cases where there is a description

avatar brianteeman brianteeman - open - 16 Feb 2019
avatar brianteeman brianteeman - change - 16 Feb 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 16 Feb 2019
Category Layout
avatar brianteeman brianteeman - change - 16 Feb 2019
Labels Added: ?
e38aaa4 16 Feb 2019 avatar brianteeman c/s
avatar dgrammatiko
dgrammatiko - comment - 16 Feb 2019

@brianteeman one thing to consider here: this description in J3 used to be the tooltip of each field. Some texts are way too long and probably inappropriate for an aria-describedby

Maybe for the shake of B/C we should leave this as is (and use it in the new tooltips, activated on mouse over a field, or on field focus) and introduce another attribute, eg describe ?

FWIW I'm not against what you're doing here, just thinking what will be the less painful approach here...

avatar brianteeman brianteeman - change - 16 Feb 2019
The description was changed
avatar brianteeman brianteeman - edited - 16 Feb 2019
avatar brianteeman brianteeman - change - 16 Feb 2019
The description was changed
avatar brianteeman brianteeman - edited - 16 Feb 2019
avatar brianteeman
brianteeman - comment - 16 Feb 2019

@dgrammatiko I would much prefer it if peo0ple could SEE those crazy long tips and submit pr to change them to something other than a manual

avatar dgrammatiko
dgrammatiko - comment - 16 Feb 2019

@brianteeman and we both know that some will resist those changes...

avatar zwiastunsw
zwiastunsw - comment - 16 Feb 2019

After the changes the descriptions are read by the screen reader. Perfectly.
@dgrammatiko : The number of characters in the aria-describedby attribute is not limited. But I agree that some descriptions need to be shortened.

avatar zwiastunsw
zwiastunsw - comment - 16 Feb 2019

I have tested this item successfully on e38aaa4

I test pages: Article new/edit, Menus new/edit, Modules new/edit. Different field types


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23919.

avatar zwiastunsw zwiastunsw - test_item - 16 Feb 2019 - Tested successfully
avatar zwiastunsw
zwiastunsw - comment - 16 Feb 2019

@brianteeman Please, correct PR title: aria-describedby

avatar brianteeman brianteeman - change - 16 Feb 2019
Title
[4.0] [a11y] ariadescribed-by when field has a description
[4.0] [a11y] aria-describedby when field has a description
avatar brianteeman brianteeman - edited - 16 Feb 2019
avatar brianteeman
brianteeman - comment - 16 Feb 2019

@zwiastunsw Thanks for testing the work so far. I will continue on this tomorrow to make sure that all fields have this functionality even if the core doesnt use it

avatar brianteeman brianteeman - change - 16 Feb 2019
The description was changed
avatar brianteeman brianteeman - edited - 16 Feb 2019
avatar brianteeman brianteeman - change - 16 Feb 2019
The description was changed
avatar brianteeman brianteeman - edited - 16 Feb 2019
avatar brianteeman brianteeman - change - 16 Feb 2019
The description was changed
avatar brianteeman brianteeman - edited - 16 Feb 2019
579c12b 16 Feb 2019 avatar brianteeman combo
avatar brianteeman brianteeman - change - 16 Feb 2019
The description was changed
avatar brianteeman brianteeman - edited - 16 Feb 2019
avatar brianteeman
brianteeman - comment - 17 Feb 2019

@dgrammatiko

Maybe for the shake of B/C we should leave this as is (and use it in the new tooltips, activated on mouse over a field, or on field focus) and introduce another attribute, eg describe ?

Are these "new tooltips" available now? We need to resolve the search box descriptions that previously looked like
image

avatar dgrammatiko
dgrammatiko - comment - 17 Feb 2019

@brianteeman the code needs some cleanup and fixing the positioning: https://codepen.io/dgrammatiko/pen/eGELjo

avatar brianteeman
brianteeman - comment - 17 Feb 2019

@dgrammatiko looks good. We need this for the search tips. If you create a pr that would be awesome

avatar dgrammatiko
dgrammatiko - comment - 17 Feb 2019

@brianteeman cans you please cancel the new variable?
Eg: this

$aria = $name . '-desc';
	$attr .= (!empty($description)) ? ' aria-describedby="' . $aria . '"' : '';

becomes

	$attr .= (!empty($description)) ? ' aria-describedby="' . $name . '-desc' . '"' : '';

Rule of thumb: declare a new variable only if you're gonna use it more than once, else you just adding more memory allocation for the app

avatar zwiastunsw
zwiastunsw - comment - 17 Feb 2019

We also need it for buttons - font icons (without label).

avatar brianteeman
brianteeman - comment - 17 Feb 2019

updated pr as requested

avatar zwiastunsw
zwiastunsw - comment - 17 Feb 2019

@brianteeman :
I found two cases where the description is not announced by the screen reader:

  • switcher case (this will be a separate PR)
  • control type : joomla-field-fancy-select
    tagi

Page type: Module site new/edit - Article Category, Popular Tags, Similar Tags
In all other cases - it is OK.

avatar brianteeman
brianteeman - comment - 17 Feb 2019
  • control type : joomla-field-fancy-select

This is another javascript one so it will have to be dealt with in a different pr by @dgrammatiko

avatar Quy
Quy - comment - 18 Feb 2019

When in an array, no need to add a leading space since it will be imploded later with a space.

This should also be fixed in layouts/joomla/form/field/url.php with all the attributes.

avatar brianteeman
brianteeman - comment - 22 Feb 2019

@wilsonge can you merge this one as well please. There won't be any more fields added to this PR as the remaining ones require js

avatar wilsonge
wilsonge - comment - 24 Feb 2019

I don't have permission to your repo to merge in 4.0. so yes - but i need you to sync up with 4.0 please

avatar brianteeman
brianteeman - comment - 24 Feb 2019

@wilsonge should be ok now

avatar wilsonge
wilsonge - comment - 25 Feb 2019

waiting for rips to be sorted but intention is to merge this next

avatar brianteeman
brianteeman - comment - 25 Feb 2019

OK - thanks

avatar wilsonge wilsonge - change - 25 Feb 2019
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-02-25 10:34:26
Closed_By wilsonge
avatar wilsonge wilsonge - close - 25 Feb 2019
avatar wilsonge wilsonge - merge - 25 Feb 2019
avatar wilsonge
wilsonge - comment - 25 Feb 2019

Thanks!

avatar brianteeman
brianteeman - comment - 25 Feb 2019

Thanks

avatar Quy
Quy - comment - 15 Oct 2019

How to make radio buttons a11y or is it already as is? There is id jform[sticky]-desc but no reference to it.

<div class="control-group">
  <div class="control-label sr-only">
    <label id="jform_sticky-lbl" > Pinned</label>
  </div>
  <div class="controls">
    <fieldset>
      <legend class="switcher__legend"> Pinned </legend>
      <div class="switcher">
        <input type="radio" id="jform_sticky0" name="jform[sticky]" value="0" checked="checked" class="active">
        <label for="jform_sticky0">No</label>
        <input type="radio" id="jform_sticky1" name="jform[sticky]" value="1" >
        <label for="jform_sticky1">Yes</label>
        <span class="toggle-outside"><span class="toggle-inside"></span></span> </div>
    </fieldset>
  </div>
  <div id="jform[sticky]-desc"> <small class="form-text text-muted"> Whether or not the Banner is 'pinned'. If one or more Banners in a Category are pinned, they will take priority over Banners that are not pinned. For example, if two Banners in a Category are pinned and a third Banner is not pinned, the third Banner will not display if the module setting is 'Pinned, Randomise'. Only the two pinned Banners will display. </small> </div>

Add a Comment

Login with GitHub to post a comment