Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♿️ aria(response message): added aria-role in response messages. #16

Open
wants to merge 4 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions assets/js/public/page-polls.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
const response = poll.find( '.forminator-response-message' );

// Print message
response.html( '<p>Your vote was submitted successfully.</p>' );
response.html( '<p role="alert">Your vote was submitted successfully.</p>' );

// Show success message
response.addClass( 'forminator-success' );
Expand All @@ -71,7 +71,7 @@
const response = poll.find( '.forminator-response-message' );

// Print message
response.html( '<p>No option has been picked yet, please choose one before submitting the form.</p>' );
response.html( '<p role="alert">No option has been picked yet, please choose one before submitting the form.</p>' );

// Add field error
field.addClass( 'forminator-has_error' );
Expand Down
2 changes: 1 addition & 1 deletion assets/js/public/page-quizzes.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

// Print summary.
result.append( summary );
result.find( '.forminator-quiz--summary' ).append( '<p>You got ' + form.find( '.forminator-is_correct' ).length + '/' + form.find( '.forminator-question' ).length + ' correct!</p>' );
result.find( '.forminator-quiz--summary' ).append( '<p role="alert">You got ' + form.find( '.forminator-is_correct' ).length + '/' + form.find( '.forminator-question' ).length + ' correct!</p>' );
result.find( '.forminator-quiz--summary' ).show();
result.find( '.forminator-quiz--summary' ).removeAttr( 'hidden' );

Expand Down
2 changes: 1 addition & 1 deletion library/js/form-simulation.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

function validateSuccess() {

message = '<p>Form was submitted successfully.</p>';
message = '<p role="alert">Form was submitted successfully.</p>';

// Print message
response.html( message );
Expand Down
6 changes: 3 additions & 3 deletions templates/page-forms/section-elements.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ <h1>Form Elements</h1>
>

<div class="forminator-response-message forminator-error forminator-show">
<p>Error message</p>
<p role="alert">Error message</p>
</div>

<div class="forminator-response-message forminator-success forminator-show">
<p>Success message</p>
<p role="alert">Success message</p>
</div>

<div class="forminator-response-message forminator-loading forminator-show">
<p>Loading message</p>
<p role="alert">Loading message</p>
</div>

</div>
Expand Down