? ? Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
28 Dec 2019

redo of #25262

A request was made to have a character count when entering a meta description. As a Proof of Concept I have done this and applied it to the Site Meta Description in the global configuration as shown in the screenshot. (If accepted it is quick to add it to all the meta description fields)

image

This can be applied to any textarea field by adding charcounter="true" to the field definition in the xml.

The character count has a default maximum of 200 characters but this can be configured in the field xml by adding maxlength="160" (this is the setting for this POC)

Accessibility is obviously very important and this PR addresses this as well. The meta description text is announced when the user focuses on the input together with the string to indicate the characters used. Obviously a live count announced by the screenreader would be distracting so it waits 2000 milliseconds before updating the user with the screen reader user with the current count.

The string 86 characters remaining of 160 characters. is a regular joomla language string except the numbers are replaced by the script. In this example I chose
"{remaining} characters remaining of {maxlength} characters.". Available placeholders are {remaining}, {maxlength}, {length}

Documentation

Needs updating to document the new charcounter option

avatar brianteeman brianteeman - open - 28 Dec 2019
avatar brianteeman brianteeman - change - 28 Dec 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 28 Dec 2019
Category Administration com_config Language & Strings JavaScript Repository Layout Libraries NPM Change
avatar jwaisner jwaisner - test_item - 3 Jan 2020 - Tested successfully
avatar jwaisner
jwaisner - comment - 3 Jan 2020

I have tested this item successfully on 5eef87d


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

avatar richard67
richard67 - comment - 4 Feb 2020

@brianteeman Is there a way to fix the hound?

avatar brianteeman brianteeman - change - 4 Feb 2020
Labels Added: ? NPM Resource Changed ?
avatar brianteeman
brianteeman - comment - 4 Feb 2020

hound is happy now

avatar richard67
richard67 - comment - 4 Feb 2020

Now the drone is mad .. but I think that's not related to your PR.

avatar joomla-cms-bot joomla-cms-bot - change - 4 Feb 2020
Category Administration com_config Language & Strings JavaScript Repository Layout Libraries NPM Change Unit Tests Administration com_admin SQL Postgresql com_ajax com_associations com_banners
avatar brianteeman
brianteeman - comment - 4 Feb 2020

lets see if drone is any happier now

avatar rdeutz
rdeutz - comment - 4 Feb 2020

Why this PR has changed 900+ files and over 200 commits, looks not right to me

avatar brianteeman
brianteeman - comment - 4 Feb 2020

something went wrong when I updated the branch :(

avatar brianteeman
brianteeman - comment - 4 Feb 2020

closing this while I fix the pr

avatar brianteeman brianteeman - change - 4 Feb 2020
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2020-02-04 16:38:04
Closed_By brianteeman
Labels Added: ?
Removed: ? NPM Resource Changed
avatar brianteeman brianteeman - close - 4 Feb 2020
avatar brianteeman
brianteeman - comment - 4 Feb 2020

Had to force push to fix the problem which prevents being able to re-open

See #27804

Add a Comment

Login with GitHub to post a comment