-
Notifications
You must be signed in to change notification settings - Fork 6
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
♿ [#2625] Add mobile design for keeping accessibility functions available on small screens #1470
Changes from all commits
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 |
---|---|---|
|
@@ -60,12 +60,6 @@ development machine. | |
|
||
git clone [email protected]:maykinmedia/open-inwoner.git | ||
cd open-inwoner | ||
# initialize submodules | ||
git submodule update --init --recursive | ||
|
||
This will include the `Open-Inwoner-Design-Tokens`_ subdirectory. When all is built and run this is where the OIP design tokens CSS will be generated. When this repository gets updated, it needs to be pulled again. | ||
|
||
.. _Open-Inwoner-Design-Tokens: https://github.com/maykinmedia/open-inwoner-design-tokens | ||
|
||
3. Install all required (backend) libraries. | ||
**Tip:** You can use the ``bootstrap.py`` script to install the requirements | ||
|
@@ -138,6 +132,9 @@ using ``npm run watch``. | |
.. _ECMA: https://ecma-international.org/ | ||
.. _Sass: https://sass-lang.com/ | ||
|
||
**Note:** The project makes use of the `open-inwoner-design-tokens package`_ , a node module which contains the values for the project's design tokens from the NL Design System. | ||
|
||
.. _open-inwoner-design-tokens package: https://github.com/maykinmedia/open-inwoner-design-tokens | ||
|
||
ElasticSearch | ||
------------- | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{% load i18n link_tags %} | ||
|
||
<p class="utrecht-paragraph"> | ||
{% trans "Doorgaan naar hoofdinhoud" as link_text %} | ||
<a href="#content" class="utrecht-skip-link utrecht-skip-link--visible-on-focus utrecht-skip-link--focus-visible" aria-label="{{ link_text }}" title="{{ link_text }}"> | ||
<span class="skip-link__text">{{ link_text }}</span> | ||
<span aria-hidden="true" class="material-icons ">south</span> | ||
</a> | ||
</p> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,23 +161,41 @@ def test_search_bar_hidden_from_anonymous_users(self): | |
config.save() | ||
|
||
response = self.client.get("/") | ||
|
||
doc = PyQuery(response.content) | ||
|
||
search_buttons = doc.find("[title='Zoeken']") | ||
search_forms = [ | ||
form | ||
for form in doc.find("form").items() | ||
if form.find("button[title='Zoeken']") | ||
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. Nitpick I guess, but: can't we simply do something like 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 did at first! But then I got the error "cssselect.parser.SelectorSyntaxError: Expected an argument, got <DELIM '[' at 15>..." and it seems due to To get around this limitation, I tried an alternative approach: first find all forms on the page, then filter them programmatically to check if they contain a button[title='Zoeken'] with a simple CSS attribute selector that would work in all browser engines. 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. Shame that the selector support appears to be limited, but no worries, thanks for the explanation! |
||
] | ||
|
||
self.assertEqual(len(search_buttons), 0) | ||
self.assertEqual( | ||
len(search_forms), 0, "Search form should be hidden for anonymous users." | ||
) | ||
|
||
def test_search_bar_not_hidden_from_anonymous_users(self): | ||
config = SiteConfiguration.get_solo() | ||
config.hide_search_from_anonymous_users = False | ||
config.save() | ||
|
||
response = self.client.get("/") | ||
|
||
doc = PyQuery(response.content) | ||
|
||
search_buttons = doc.find("[title='Zoeken']") | ||
search_forms = [ | ||
form | ||
for form in doc.find("form").items() | ||
if form.find("button[title='Zoeken']") | ||
] | ||
|
||
self.assertGreater( | ||
len(search_forms), 0, "Search form should be visible for anonymous users." | ||
) | ||
|
||
for button in search_buttons: | ||
self.assertEqual(button.tag, "button") | ||
# Check each search form for the expected input element | ||
for search_form in search_forms: | ||
search_input = search_form.find("input[type='text'][name='query']") | ||
self.assertEqual( | ||
len(search_input), | ||
1, | ||
"Each search form should have a single text input named 'query'.", | ||
) |
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.
Might not be a bad idea to still include a reference to this repo? Not in these steps indeed, but just as a note (perhaps in step 5, "Note the project makes use of the
open-inwoner-design-tokens
package, which contains the project's design tokens for the NL Design System."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.
Oh yeah, I could, though programmatically it has the same importance as all other NPM packages needed for this project to work, so NLDS package is just another Node module now.
This Readme contained a remnant from when we were still using some subdirectory packages.