-
Notifications
You must be signed in to change notification settings - Fork 26
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
Feature/4717 accessibility improvements aria #4747
Feature/4717 accessibility improvements aria #4747
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4747 +/- ##
=======================================
Coverage 96.55% 96.55%
=======================================
Files 748 748
Lines 25413 25417 +4
Branches 3358 3361 +3
=======================================
+ Hits 24538 24542 +4
Misses 610 610
Partials 265 265 ☔ View full report in Codecov by Sentry. |
3754d30
to
588e215
Compare
588e215
to
051122f
Compare
renderer = Renderer(self.submission, mode=RenderModes.pdf, as_html=True) | ||
# set up mock registry without special fieldset/editgrid behaviour | ||
register = Registry() | ||
|
||
nodelist = [] | ||
with patch("openforms.formio.rendering.registry.register", new=register): | ||
for component in self.step.form_step.form_definition.configuration[ | ||
"components" | ||
]: | ||
if component["type"] == "selectboxes" or component["type"] == "radio": | ||
component_node = ChoicesNode( | ||
step_data=self.step.data, component=component, renderer=renderer | ||
) | ||
elif component["type"] == "select": | ||
component_node = SelectNode( | ||
step_data=self.step.data, component=component, renderer=renderer | ||
) | ||
elif component["type"] == "textfield": | ||
component_node = TextNode( | ||
step_data=self.step.data, component=component, renderer=renderer | ||
) | ||
nodelist += list(component_node) |
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.
This is supposed to use our actual implemetnations, no? I don't understand why a separate registry is being set up and component nodes instantiated directly rather than that the factory ComponentNode.build_node(...)
is used for each component which looks up the appropriate specialized class in the registry.
I'd also expect this test to be a test def test_render_mode_pdf_with_list_values(self)
in openforms.formio.rendering.tests.test_component_node
rather than its own class and file. Note that I also renamed that test case name in my PR because it was a bad copy paste, so if you apply that same change we shouldn't get any merge conflicts.
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.
Yeah... this is a part of the value_list
concept..
With my changes to remove the value_list
and to add the expected html to the display_value
, i've also changed this test
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.
I don't fully understand your comment about the test case naming... but I think it should be fine now..
@classmethod | ||
def setUpTestData(cls): | ||
super().setUpTestData() |
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.
Preferably set up the test data inside the test itself rather than creating context switches. You only have a single test, so this test data is only relevant for that single test anyway.
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.
Okay check, i'll keep that in mind.. 👍
src/openforms/submissions/templates/report/submission_report.html
Outdated
Show resolved
Hide resolved
8160754
to
f3ac6c9
Compare
f3ac6c9
to
97fbb37
Compare
97fbb37
to
973f78d
Compare
973f78d
to
b5daa22
Compare
Closes #4717
Changes
The site logo now provides a better textual alternative, the error message element now has the appropriate
role
and the PDF's are now screenreader friendly :)Checklist
Check off the items that are completed or not relevant.
Impact on features
Release management
I have updated the translations assets (you do NOT need to provide translations)
./bin/makemessages_js.sh
./bin/compilemessages_js.sh
Commit hygiene