-
Notifications
You must be signed in to change notification settings - Fork 0
Meter
Project lead: Paul Jackson (@pjackson28)
The HTML5 meter element displays a scalar measurement in a known range. Because some browsers do not support this functionality natively, this polyfill emulates the same functionality using generic HTML and WAI-ARIA.
Browsers that do not support the meter element natively ignore the meter functionality and therefore, nothing would be displayed. This polyfill ensures that the meter is displayed and the necessary information is exposed to assistive technologies by adding ARIA.
To use the polyfill, the standard meter element must be used. In cases where browser don't support this element, the polyfill is automatically loaded.
The meter polyfill accepts the same six parameters as the HTML5 meter element.
<meter min="20" value="65" max="80">75% (normal)</meter>
<meter min="0" value="90" max="100" high="80">90% (too high)</meter>
<meter min="100" low="120" value="115" max="200" high="180">15% (too low)</meter>
Meter is dependent upon native support for the HTML5 meter element or the meter polyfill.
The code for the meter polyfill is located in several places within the source folder of WET:
- js/polyfills/meter.js - contains the JavaScript code for the meter polyfill
- js/sass/includes/_meter.scss - contains the CSS for the meter polyfill
There are no known issues at this point in time.