RGAA 3.0 - Rule 7.4.1

Summary

This test consists in detecting patterns that are known to change context automatically :

  • A <select> element with an "onchange" attribute
  • A <form> element without submit button

Business description

Criterion

7.4

Test

7.4.1

Description

Does each script initiating a change of context meet one of the following conditions? The user is warned by a text about the script action and the kind of change before it is activated

Level

A

Technical description

Scope

Page

Decision level

Semi-Decidable

Algorithm

Selection

Set1

All the <select> tags with an “onchange” attribute (select[onchange])

Set2

All the <form> tags with a <select> child but without child of type <button>, <input type='submit'>, <input type='button'> or ` (form:has(select):not(:has(button)):not(:has(input[type=submit])):not(:has(input[type=button])):not(:has(input[type=reset])))

Process

Test1

For each occurence of Set1 and Set2, raise a MessageA

 Test2

If Set1 AND Set2 are empty, raise a MessageB

MessageA : Context changed by script detected
  • code :ContextChangedScriptDetected
  • status: Pre-Qualified
  • parameter : snippet
  • present in source : yes
MessageB : No Pattern detected
  • code : NoPatternDetected_Rgaa30-07041
  • status: Pre-Qualified
  • present in source : no

Analysis

Pre-qualified

In all cases

TestCases

TestCases files for rule 7.4.1