User tests: Successful: Unsuccessful:
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)
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}
Needs updating to document the new charcounter option
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_config Language & Strings JavaScript Repository Layout Libraries NPM Change |
@brianteeman Is there a way to fix the hound?
Labels |
Added:
?
NPM Resource Changed
?
|
hound is happy now
Now the drone is mad .. but I think that's not related to your PR.
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 |
lets see if drone is any happier now
Why this PR has changed 900+ files and over 200 commits, looks not right to me
something went wrong when I updated the branch :(
closing this while I fix the pr
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 |
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.