Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A jQuery plugin that adds support for ARIA attributes.
JavaScript CSS
tag: v1.0.1

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
spec
src
.gitignore
CHANGELOG.md
README.md

README.md

jQuery ARIA

A jQuery plugin that adds support for ARIA attributes.

This project uses Semantic Versioning.

Usage

jQuery.aria(element, key, value)

Sets and returns aria attribute data.

Args:

  • element - A DOM element to be checked for aria attributes.
  • key - A string naming the ARIA data to set.
  • value - The new aria attribute value.

    Returns: Object

    Example:

    ...

    jQuery.aria(document.getElementById('foo'), 'owns'); // => "bar" jQuery.aria(); // => {'owns': 'bar'} jQuery.aria($('#foo'), 'owns', 'baz'); // sets aria-owns to "baz"

.aria(key, value)

An attached function that behaves the same as jQuery.aria.

jQuery.hasAria(element)

Determine whether an element has any jQuery aria attributes associated with it.

Args:

  • element - A DOM element to be checked for aria attributes.

    Returns: Boolean

    Example:

    ...

    jQuery.hasAria(document.getElementById('foo')); // => true jQuery.hasAria($('#foo')); // => true

jQuery.removeAria(element [, name])

Removes aria attributes.

Args:

  • element - A DOM element to be checked for aria attributes.
  • name - A string naming the ARIA data to remove.

    Returns: jQuery

    Example:

    ...

    jQuery.removeAria(document.getElementById('foo'), 'owns'); // removes the aria-owns attribute jQuery.removeAria($('#foo')); // removes all aria attributes

.removeAria([name])

An attached function that behaves the same as jQuery.removeAria.

License

This is licensed under the MIT license. The license itself can be found in the source.

Something went wrong with that request. Please try again.