css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <div lang="fr">
  <h2>Description</h2>
  <p>Test réalisé pour la classe ".sr-only" de Bootstrap et la classe ".hors-ecran" de AcceDe Web.</p>
  <p>Je n'inclus pas la classe <a href="https://www.drupal.org/node/1328970"> ".element-invisible" de Drupal</a> ou la classe <a href="http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/">".hide-text" de Zeldman</a> qui ne fonctionnent pas visuellement pour tous les cas.</p>
  <p>Utilisez-vous d'autres techniques en CSS ?</p>
  <h2>Test</h2>
  <ol>
    <li>
      Cas 1 (bouton Bootstrap) : <button class="bt-test"><span class="sr-only">Bouton pour tester l'accessibilité de la classe "sr-only" de Bootstrap</span></button>
    </li>
    <li>
      Cas 2 (bouton AcceDe Web) : <button class="bt-test"><span class="hors-ecran">Bouton pour tester l'accessibilité de la classe "hors-ecran" de AcceDe Web</span></button>
    </li>
    <li>
      Cas 3 (lien Bootstrap) : <a href="#" class="bt-test"><span class="sr-only">Lien pour tester l'accessibilité de la classe "sr-only" de Bootstrap</span></a>
    </li>
    <li>
      Cas 4 (lien AcceDe Web) : <a href="#" class="bt-test"><span class="hors-ecran">Lien pour tester l'accessibilité de la classe "hors-ecran" de AcceDe Web</span></a>
    </li>
    <li>
      Cas 5 (texte Bootstrap) : <span class="bt-test"><span class="sr-only">Texte pour tester l'accessibilité de la classe "sr-only" de Bootstrap</span></span>
    </li>
    <li>
      Cas 6 (texte AcceDe Web) : <span class="bt-test"><span class="hors-ecran">Texte pour tester l'accessibilité de la classe "hors-ecran" de AcceDe Web</span></span>
    </li>
  </ol>

  <h3>Compatibilité</h3>
  <p>Résultats probants pour tous les cas sur :</p>
  <ul>
    <li>NVDA 2015 et 2016 : FF 45, IE 11, Edge 25</li>
    <li>VoiceOver : iOS 9.3.1, Safari 9.0.3 pour OSX 10.10.5</li>
    <li>Jaws 16/17 : FF 45.0.2, IE11 </li>
  </ul>
  <p>Pour ORCA sous Linux avec Firefox 45, tous les cas passent mais le cas 5 est lu mot à mot (passage avec les flèches de navigation).</p>
  <h2>Conclusion</h2>
  <p><strong>La classe ".hors-ecran" de AcceDe Web est à préférer</strong> à toute autre solution mais l'utilisation de la classe ".sr-only" de Bootstrap n'est pas bloquante.</p>
  <p><strong>Note :</strong> En mode RTL (right to left), une scrollbar horizontale peut apparaître avec la classe .hors-ecran. Changer le "left" pour un "right" dans ce cas.</p>
  <hr />
  <p><em>Merci à <a href="https://twitter.com/sebcbien">@sebcbien</a> & <a href="https://twitter.com/ma_magie">@ma_magie</a> pour leur aide apportée pour les tests sous Jaws et VoiceOver</em></p>
</div>
            
          
!
            
              /**
* Style pour les boutons
*/
li{
  margin-bottom:20px;
}

.bt-test {
  border:0 none;
  background-color:#2B529B;
  display:inline-block;
  padding:5px;
    
  &::before{
    content:"";
    display:block;
    width: 24px;
    height: 24px;
    background-image: url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDkyLjgzMyA5Mi44MzMiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDkyLjgzMyA5Mi44MzM7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPGc+Cgk8Zz4KCQk8cGF0aCBkPSJNODkuODM0LDEuNzVIM2MtMS42NTQsMC0zLDEuMzQ2LTMsM3YxMy4zMzRjMCwxLjY1NCwxLjM0NiwzLDMsM2g4Ni44MzNjMS42NTMsMCwzLTEuMzQ2LDMtM1Y0Ljc1ICAgIEM5Mi44MzQsMy4wOTYsOTEuNDg4LDEuNzUsODkuODM0LDEuNzV6IiBmaWxsPSIjRkZGRkZGIi8+CgkJPHBhdGggZD0iTTg5LjgzNCwzNi43NUgzYy0xLjY1NCwwLTMsMS4zNDYtMywzdjEzLjMzNGMwLDEuNjU0LDEuMzQ2LDMsMywzaDg2LjgzM2MxLjY1MywwLDMtMS4zNDYsMy0zVjM5Ljc1ICAgIEM5Mi44MzQsMzguMDk2LDkxLjQ4OCwzNi43NSw4OS44MzQsMzYuNzV6IiBmaWxsPSIjRkZGRkZGIi8+CgkJPHBhdGggZD0iTTg5LjgzNCw3MS43NUgzYy0xLjY1NCwwLTMsMS4zNDYtMywzdjEzLjMzNGMwLDEuNjU0LDEuMzQ2LDMsMywzaDg2LjgzM2MxLjY1MywwLDMtMS4zNDYsMy0zVjc0Ljc1ICAgIEM5Mi44MzQsNzMuMDk1LDkxLjQ4OCw3MS43NSw4OS44MzQsNzEuNzV6IiBmaWxsPSIjRkZGRkZGIi8+Cgk8L2c+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==);
  }
}

button.bt-test,
a.bt-test{
  cursor:pointer;

  &:hover,
  &:focus{
    background-color:#162A51;
  }
}

/**
* Texte masqué en CSS 
*/
/* Test .sr-only Bootstrap */
.sr-only {
  border: 0 none;
  clip: rect(0px, 0px, 0px, 0px);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

/* Test position absolue cf. http://www.accede-web.com/notices/html-css-javascript/6-images-icones/6-1-polices-icones-icon-fonts/ */
.hors-ecran {
  position: absolute;
  left: -99999px;
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console