Skip to content
This repository has been archived by the owner on Aug 10, 2020. It is now read-only.

Pull: support for arbitrary HTML 4 documents, plus unit tests #14

Merged
merged 12 commits into from
Mar 27, 2013

Conversation

nfreear
Copy link
Contributor

@nfreear nfreear commented Mar 18, 2013

Hi Yatil,

As proposed in #12 and #13, I've implemented support for arbitrary HTML 4 documents via a second argument to the function:

AccessifyHTML5( false, {
  "My selector": {
    role: "banner",
    "aria-label": "My label"
  }
  /* More fixes.. */
});

There are two unit-test pages,

As I have noted in the code //Question: ..?,

  1. In calls to document.querySelectorAll, should we catch exceptions and report (or ignore) bad selector syntax?
  2. And, should we accept poor spelling/ variations in some attributes? For example, aria-labeledby, labelledby-ref...

To help explore these points, I've knocked together a rough 'validator',

Thanks, Nick

…rJS,

* Before implementing bug yatil#12 - extend AccessifyHTML5 for arbitrary HTML 4,
* Initially vanillajs,
* http://busterjs.org
* That is, roles for arbitrary legacy HTML containing <div> etc,
* AccessifyHTML5(): argument 1 unchanged, argument 2 added,
* Commit adds support for `aria-label` attributes etc,
* Todo: add support for `aria-labelledby`,
* yatil#13, `bjs1` unit test still passes + new `bjs2` - BusterJS.
* Improve comments - pose questions!
* Add conditional comments so that tests aren't run! (They crash MSIE)
* Add a "Sorry.." message for MSIE
* Add a Regex match against an attribute 'whitelist' - `ATTR_SECURE`
* Add a typeof test for the value
* Add unit tests - issue yatil#13
…min.js`

* ..And enable switching unit test to `min` JS: `/test/bjs2.html?min=1`
* yatil#13, Added unit test for "describee?dby"
* yatil#12, Used Closure: http://closure-compiler.appspot.com/home
* Plus, moved test-utility Javascript to `accessify-qutils.js` - yatil#13
…tes - yatil#15

* Add, /..|maxlength|placeholder|pattern|type/ - tighten /data-[\w]/ regex
* HTML5 forms support
* Bug yatil#13, add unit test for <input type = email > - BusterJS
* Add Github "Fork me" banner in CSS, `yatil/accessifyhtml5.js`
* http://closure-compiler.appspot.com - SIMPLE_OPTIMIZATIONS
yatil added a commit that referenced this pull request Mar 27, 2013
Pull: support for arbitrary HTML 4 documents, plus unit tests
@yatil yatil merged commit e7fde59 into yatil:master Mar 27, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants