yui/yui3 — pull request #542 by gerardkcohen (2013-03-25 15:21:43+00:00)
Title: [Node] Show/ Hide Accessibility Improvements

Show/ hidden states of a node need to be properly communicated to AT users. This small fix modifies the _show and _hide methods to set or remove a node's hidden attribute, which has a more semantic meaning and is supported by screen readers. It also has the benefit that supporting browsers will hide the content (equivalent to display: none) without having to specify the CSS manually (by the user or framework) on the node itself. For older browsers that do not automatically hide the content via the hidden attribute, the style display: none still still needs to be used, however the state will still be communicated properly with the hidden attribute. This minor fallback could be done via conditional loading but I felt that it was too small of a change to warrant the overhead, and so I left it in the node-view.js unless it is suggested otherwise.

I also updated the _isHidden method to check for the hidden attribute, added toggle to the Showing and Hiding example, and a section on how to check for visibility using the hidden attribute.

This request includes the changes to node-view.js, along with the unit tests, API docs, and example docs.