Barre de progression (correctif pour l'élément progress) - nschonni/wet-boew GitHub Wiki
Chef du project : Laurent Goderre(@LaurentGoderre)
The HTML5 progress
element allows to display the progress of a task. 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 progress
element natively ignore the progress bar and therefore, nothing is displayed and its content is not exposed to assistive technologies. This polyfill ensures that the progress is visually conveyed through a progress bar and exposed to assistive technologies by adding ARIA.
To use the polyfill, a standard progress element must be used. In cases where browser don't support the progress element, the polyfill is automatically loaded.
The progress bar polyfill accepts two parameters: max
and value
. Neither of these parameters are required.
This parameter represent the progress of the task and can be any decimal number between 0 and the max
value. If value
is omitted, the progress bar is considered to be undeterminate, which means that there is no indication on the actual progress of the task.
This parameter represent the maximum progress for the task. When the value parameter is set to the maximum value, the task is considered complete. The max
parameter can be any positive decimal number. If the parameter is omitted, the default value of 1.0 is assumed.
The working examples are located here
<progress value="25" max="100" />
<progress value="50" max="50" />
<progress />
or
<progress max="50" />
La barre de progression est dépendent sur le soutien natif pour l'élément progress de html et le correctif pour l'élément progress.
Le code pour la barre de progression se trouve à plusieurs endroits dans la répertoire source de la BOEW :
- js/polyfills/progress.js - contient le code JavaScript pour le correctif pour l'élément progress
- js/sass/progress.scss - contient le CSS pour le correctif pour l'élément progress
- js/images/progress/ - contient les images pour le correctif pour l'élément progress
Il n’existe actuellement aucun problème connu.