-
Notifications
You must be signed in to change notification settings - Fork 20
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
#2871: bundle screenreader - [no sandbox currently] #3356
Changes from all commits
4468130
f4ff1ec
40604a1
41b7c93
800405a
f17faf9
eb76d7b
6723b95
19f845c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,9 +15,11 @@ class DomainHelper: | |
|
||
# a domain name is alphanumeric or hyphen, up to 63 characters, doesn't | ||
# begin or end with a hyphen, followed by a TLD of 2-6 alphabetic characters | ||
DOMAIN_REGEX = re.compile(r"^(?!-)[A-Za-z0-9-]{1,63}(?<!-)\.[A-Za-z]{2,6}$") | ||
DOMAIN_REGEX = re.compile(r"^(?!-)[A-Za-z0-9-]{1,200}(?<!-)\.[A-Za-z]{2,6}$") | ||
|
||
# a domain can be no longer than 253 characters in total | ||
# NOTE: the domain name is limited by the DOMAIN_REGEX above | ||
# to 200 characters (not including the .gov at the end) | ||
Comment on lines
+21
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I appreciate the comments here! |
||
MAX_LENGTH = 253 | ||
|
||
@classmethod | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,7 @@ <h2>What .gov domain do you want?</h2> | |
|
||
<p id="domain_instructions" class="margin-top-05">After you enter your domain, we’ll make sure it’s available and that it meets some of our naming requirements. If your domain passes these initial checks, we’ll verify that it meets all our requirements after you complete the rest of this form.</p> | ||
|
||
{% with attr_aria_describedby="domain_instructions domain_instructions2" %} | ||
{% with attr_aria_labelledby="domain_instructions domain_instructions2" attr_aria_describedby="id_dotgov_domain-requested_domain--toast" %} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (potentially blocking) @SamiyahKey Unlike current sites, this doesn't read the header then the description. Is that something we want here? This is for the .gov domain page There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @zandercymatics good catch! Ideally, we should follow a consistent reading order that aligns with accessibility best practices, ensuring that users receive information in a logical and expected sequence. We should definitely be maintaining a predictable reading order. The header should generally be announced first to provide context before the description is read. If the current implementation deviates from this pattern, we might need to revisit the heading hierarchy or ARIA roles to ensure we're meeting user expectations. Do we know if this change was intentional? If there isn't a reason we should adjust it to match the reading order as it is throughout .gov |
||
{# attr_validate / validate="domain" invokes code in getgov.min.js #} | ||
{% with append_gov=True attr_validate="domain" add_label_class="usa-sr-only" %} | ||
{% input_with_errors forms.0.requested_domain %} | ||
|
@@ -67,12 +67,14 @@ <h2>Alternative domains (optional)</h2> | |
<p id="alt_domain_instructions" class="margin-top-05">Are there other domains you’d like if we can’t give | ||
you your first choice?</p> | ||
|
||
{% with attr_aria_describedby="alt_domain_instructions" %} | ||
{% with attr_aria_labelledby="alt_domain_instructions" %} | ||
{# Will probably want to remove blank-ok and do related cleanup when we implement delete #} | ||
{% with attr_validate="domain" append_gov=True add_label_class="usa-sr-only" add_class="blank-ok alternate-domain-input" %} | ||
{% for form in forms.1 %} | ||
<div class="repeatable-form"> | ||
{% input_with_errors form.alternative_domain %} | ||
{% with attr_aria_describedby=form.alternative_domain.auto_id|stringformat:"s"|add:"--toast" %} | ||
{% input_with_errors form.alternative_domain %} | ||
{% endwith %} | ||
</div> | ||
{% endfor %} | ||
{% endwith %} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(potentially blocking) The from itself doesn't have a max length attribute, so if you enter more than 200 chars you just get a generic message. Should be fixable via adding max length to the form element, but this may be outside the scope of the ticket - let me know. @SamiyahKey what are your thoughts?