Contenu affichable masquable (correctif pour les éléments details summary) - nschonni/wet-boew GitHub Wiki
Chef du projet : Alexander Canas (@canasa)
Needs translation
The HTML5 details and summary elements allows content to be expanded and collapsed. 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 details and summary elements natively ignore the expand/collapse functionality and therefore, content is displayed in full. This polyfill ensures that content can be expanded/collapsed and the necessary information is exposed to assistive technologies by adding ARIA.
To use the polyfill, standard details and summary elements must be used. In cases where browser don't support these elements, the polyfill is automatically loaded.
The expandable/collapsible content polyfill accepts one parameter: open. This parameter is automatically added/removed when .
This parameter represent the state of the expansion/collapse of the details element. If the open parameter is present, the content of details is expanded. If the open parameter is absent, the content of details is collapsed.
<details open="open"> <summary>View source code</summary> ... Source code ... </details>
<details> <summary>View source code</summary> ... Source code ... </details>
Le contenu affichable/masquable est dépendent sur le soutien natif pour les éléments details et summary de HTML5 et le correctif pour le contenu affichable/masquable.
Le code pour le contenu affichable/masquable se trouve à plusieurs endroits dans la répertoire source de la BOEW :
- js/polyfills/details.js - contient le code JavaScript pour le correctif pour le contenu affichable/masquable
- js/sass/details.scss - contient le CSS pour le correctif pour le contenu affichable/masquable
- js/sass/details-ie7.scss - contient le CSS spécifique à IE7 pour le correctif pour le contenu affichable/masquable
Il n’existe actuellement aucun problème connu.