Skip to content

Commit

Permalink
Merge pull request #969 from Webperf-se/a11y-statement-1-rating
Browse files Browse the repository at this point in the history
A11y Statement Test - Set 1 in rating when statement not found
  • Loading branch information
7h3Rabbit authored Feb 17, 2025
2 parents 2cadeeb + 4702530 commit cec576e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/a11y_statement.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ def get_rating_not_set_rating(url, return_dict, local_translation, global_transl
return_dict['failed'] = True
return rating

rating.set_a11y(1.0, local_translation(
'TEXT_REVIEW_NO_ACCESSIBILITY_STATEMENT'))
rating.set_overall(1.0, local_translation(
'TEXT_REVIEW_NO_ACCESSIBILITY_STATEMENT'))
rating.overall_review = local_translation('TEXT_REVIEW_CALLED_URL').format(
Expand Down Expand Up @@ -434,6 +436,8 @@ def rate_statement(statement, global_translation, local_translation):
else:
tmp = rating.overall_review.replace('GOV-IGNORE', '').strip('\r\n\t ')
if len(tmp) > 0:
rating.set_a11y(1.0, local_translation(
'TEXT_REVIEW_NO_ACCESSIBILITY_STATEMENT'))
rating.set_overall(1.0, local_translation(
'TEXT_REVIEW_NO_ACCESSIBILITY_STATEMENT'))
rating.overall_review = local_translation('TEXT_REVIEW_CALLED_URL').format(
Expand Down

0 comments on commit cec576e

Please sign in to comment.