====== 2.3.3. Simulated drop-down lists ====== ===== Purpose ===== Drop-down lists referred to as “simulated” only use some of the default HTML form elements for drop-down lists, namely, the Without JavaScript, a standard form is shown to the user. ===== Behaviour with JavaScript ===== With JavaScript, the behaviour of simulated drop-down lists must be the same as those of standard drop-down lists. To implement the essentials of this method, you need to respect the following steps: - The CSS property ''opacity: 0;'' is applied to the ''''. The list stays in the same place on the screen, since it is only made invisible by changing the opacity. - An empty container is created in the DOM, just after the '''' is positioned in the CSS just above the created container, so that when you click on the container it triggers the opening of the drop-down list. Going into more detail, the scripts must handle the following points: * The CSS property ''opacity: 0;'' is applied to the ''''. In our example, a is used. * The ''aria-hidden="true"'' attribute is applied to the container, in order to hide it from users of screen readers, who otherwise would have access to the invisible ''''. This class is deleted as soon as the '' ===== Démonstration ===== * [[http://accede.info/demos/en/demo-liste-deroulante-simulee-accessible-en/|Online demo of a simulated drop-down list]].