Commit Graph

16 Commits

Author SHA1 Message Date
eden-jh
6eb2df0da1 Core: Unnecessary aria-describedby (#2410)
* Core: progress on removing aria-describedby from valid fields

* core: aria-describedby

* Core: remove aria-describedby when hiding error

* Core: fix syntax issues, Test: add test for new setting

* Core: Fix bugs in aria-describedby behavior and related tests

* Core: bugfix for labels without id

* Core: don't create a new error element if one exists

* Core: progress on test for group of fields with ariaDescribedbyCleanup

* Core: Groups aria-describedby

* Core: fix aria-describedby not being removed from grouped fields

Ensure that aria-describedby is removed from all members of a group when 
all the known errors are resolved

* Core: Update capitalization

* Demo: Add page for ariaDescribedByCleanup

* Core: add setting to remove aria-describedby from valid fields

Includes additional unit tests and a demo page

* Core: Fix camel case inconsistency, remove stray comment

* Update demo/css/cmxform.css

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Kieran <kieran.brahney@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-03 11:46:18 +01:00
Volkan Ceylan
7a490d8f39 Core: Added escapeHtml option to avoid XSS attacks via showLabel methods (#2462) 2023-02-01 10:26:18 +00:00
Brahim Arkni
8fe4a90185 Tests: Upgrade QUnit to 2.0.
Closes #1777. #1681.
2016-07-22 17:56:18 +02:00
Brahim Arkni
ef6821aba3 Core: Error hidden but input error class not removed
When a field has one rule with option `depends` specified and this
dependency mismatch, the plugin will remove it, so that field will not be
validated on submit by the the rule in question. So if that field is
already invalid, only the error message will be hidden and the error class
will remain.

This commit fixes this issue.

Fixes #1632
2016-01-07 18:12:51 +01:00
Brahim Arkni
729823a807 All: Fixed code style issues 2015-10-30 23:55:26 +00:00
Brahim Arkni
8327818438 Core: Escape errorID for use in the regex, not to build aria-describedby
The error ID was being escaped for use in a regex, but these escaped
characters were also being passed on to the aria-describedby value
set in the HTML, which means the ID doesn't match up with the ID of
the element it's referring to.

Fixes #1523
Closes #1587
2015-10-19 16:52:16 +01:00
Brahim Arkni
9b498e0113 Test: Added unit test that runs into the issue reported in #1523 2015-10-17 14:28:29 +01:00
Brahim Arkni
d845a33c6e Test: Added unit test runs into the error reported in #1603 2015-10-09 15:46:05 +01:00
Brahim Arkni
842e7ff5dd Test: Fix misuse of equal method & some spacing issues. 2015-09-25 16:54:38 +01:00
a-barry
394a246d4a Core: Escape dollar sign in error id
Fix non label error elements containing $ character in the name/id
(asp.net web forms) causing syntax error in sizzlejs.

Fixes #1331
Closes #1336
2014-12-02 16:37:38 +01:00
Jörn Zaefferer
20f3e9fac9 Core: Escape id/name before using it as a selector in errorsFor
Fixes #1275
2014-09-23 13:27:51 +02:00
Damian Mooyman
c054707d6f Core: Fix incorrect regexp
Fixes #1200
Closes #1201
2014-08-11 17:08:41 +02:00
Damian Mooyman
ea22f54348 Core: Respect non-error aria-describedby and empty hidden errors
Ref #1083
Closes #1140
2014-06-23 11:17:35 +02:00
Damian Mooyman
18eed400c8 Tests: Update error-placement test for jQuery 1.11 compatibility
Closes #1158
2014-06-10 10:51:56 +02:00
Nick Schonning
d0c56e005e Build: Run JSCS against tests 2014-05-27 00:08:54 -04:00
Damian Mooyman
e5e70b1632 Core: Use aria-describedby for non-label elements
Fixes #900
Closes #1083
2014-05-21 11:39:51 +02:00