System Messages (INT-003)

Provide robust system messages that alert and inform

When system messages are used they must include the role=”status” aria attribute and the aria-live=”assertive” attribute on the message container when it is added to the DOM.

System messages should only be added to the DOM after a button press or on page load so that they do not interrupt the user experience. The aria-live=”assertive” attribute will cause interruption if the message is added to the DOM before the user expects it.

Requirements

System Messages role="status" (INT-WEB-003-01)

System messages and success messages MUST include the ARIA role="status" attribute on the message container when it is added to the DOM. The aria-live="assertive" attribute MAY also be used for critical information.

<div id="sysMsg" class="system-message" style="display: none;"></div>
		

$('#sysMsg').text(/* error from system */).css('display', 'block').attr({
	'role': 'status', 
	'aria-live': 'assertive'
});
		

System Messages after Submit (INT-WEB-003-02)

To ensure that aria-live=”assertive” does not cause messages to interrupt users, system and success messages SHOULD only be added to the DOM after a button press or on page reload.

$('button#submit').click(function(){
	$('#sysMsg').text(/* system message */).css('display', 'block').attr({
		'role': 'status', 
		'aria-live': 'assertive'
	});
});
		


Test Procedures

Screen reader (INT-WEB-003-01-T)

Confirm that the contents of system and success messages are read aloud to the user when they appear.

Keyboard (INT-WEB-003-02-T)

Confirm that system and success messages are only presented to users after a button press or on page load.


Related Content

WCAG Success Criteria

W3C Techniques

These materials and steps outlined on this website are provided “AS IS” and are intended for illustrative purposes only. They should not be relied upon for marketing, legal, tax, financial, regulatory or other advice. You are responsible for the legal aspects of any implementation of the concepts illustrated herein. Further, Visa neither makes any warranty or representation as to the completeness or accuracy of this information, nor assumes any liability or responsibility that may result from reliance on such information.  You should not act or rely on such content without seeking the advice of a professional.  All brand names, logos and/or trademarks are the property of their respective owners, are used for identification purposes only, and do not necessarily imply product endorsement or affiliation with Visa.