Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
061fcd6
Add change log
nngu6036 Nov 25, 2019
b67f448
Add robot test
nngu6036 Nov 25, 2019
4bcea21
Add aria label to search input
nngu6036 Nov 25, 2019
f9640de
Merge branch 'master' into 'quang/add_aria_label_to_search_input'
JeffersonBledsoe Sep 4, 2020
78b7dd8
Formatting
JeffersonBledsoe Sep 4, 2020
28c65f7
Add aria-label to mosaic tiles
JeffersonBledsoe Sep 4, 2020
18811d2
Change search input type to search. No functional change with this co…
JeffersonBledsoe Sep 4, 2020
10863b4
Change form role from generic form to search
JeffersonBledsoe Sep 4, 2020
b8cafe4
Adjust test to use the search role of the form as well as checking th…
JeffersonBledsoe Sep 4, 2020
1a93bb6
Try fix failling test
JeffersonBledsoe Sep 4, 2020
bd8bf52
Merge branch 'master' into quang/add_aria_label_to_saerch_input
JeffersonBledsoe Jun 3, 2021
c40efd6
Label the search input by the portlet title
JeffersonBledsoe Jun 3, 2021
38a94b8
Adjust test to check for input type for focus
JeffersonBledsoe Jun 3, 2021
414e869
Fix aria-labelledby value
JeffersonBledsoe Jun 24, 2021
e24f9b6
Merge branch 'master' into quang/add_aria_label_to_saerch_input
JeffersonBledsoe Aug 21, 2021
2a55e51
Fix bad merge
JeffersonBledsoe Aug 21, 2021
6502558
Fix the id value for inputs being incorrect and adjust the tests
JeffersonBledsoe Aug 21, 2021
7789ffc
Ensure the tile has a title in the test
JeffersonBledsoe Aug 21, 2021
0d7472e
Only use the aria label to find the element
JeffersonBledsoe Aug 21, 2021
94f3330
Update changelog
JeffersonBledsoe Sep 16, 2021
262738c
Whitespace in changelog
JeffersonBledsoe Sep 17, 2021
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
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Breaking Change:

- Add idx parameter to display_modifier call, so that we can use the index name to resolve the correct translated taxonomy titles in collective.taxonomy. This means that the display_modifier method in the groupby_modifier adapters needs to expect this parameter too!
[MrTango]
- Added aria-markup to the search input
[nngu6036 and JeffersonBledsoe]


3.5.1 (2021-05-26)
Expand Down
11 changes: 5 additions & 6 deletions src/collective/collectionfilter/portlets/collectionsearch.pt
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@
tal:condition="view/available"
i18n:domain="plone">

<header class="portletHeader" tal:condition="view/title" tal:content="view/title">Title</header>
<header class="portletHeader" tal:condition="view/title" tal:content="view/title" id="${string:${view/filterClassName}}">Title</header>
<div class="searchContent">
<form method="get" name="searchForm" role="form" action="${view/action_url}">
<form method="get" name="searchForm" role="search" action="${view/action_url}">
<tal:urlquery repeat="item python:view.urlquery">
<input type="hidden" name="${python:item[0]}" value="${python:item[1]}"/>
</tal:urlquery>
<input name="SearchableText" type="text"
placeholder="Search"
<input name="SearchableText" type="search"
aria-labelledby="${string:${view/filterClassName}}"
data-url="${view/ajax_url}"
value="${view/value}"
i18n:attributes="placeholder text_search"/>
value="${view/value}"/>
<button type="submit" i18n:translate="button_search">Search</button>
</form>
</div>
Expand Down
2 changes: 2 additions & 0 deletions src/collective/collectionfilter/tests/robot/keywords.robot
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,8 @@ Add search tile
Edit Current Tile
run keyword if $collection_name set relateditem formfield-collective-collectionfilter-tiles-search-target_collection ${collection_name}
# Run Keyword by label Content Selector Input Text .contentlisting-tile
Wait until element is visible css=input#collective-collectionfilter-tiles-search-header
Input text css=input#collective-collectionfilter-tiles-search-header Searchable Text
Click element css=.pattern-modal-buttons #buttons-save


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,12 @@ Scenario: Search filter
# Then should be 2 collection results
# and should be 4 filter options

Scenario: I can access search through ARIA

Given I've got a site with a collection
and my collection has a collection search
and I'm viewing the collection

Wait Until Element Is Visible xpath=//input[@aria-labelledby='filterSearchable-text']
Click element xpath=//input[@aria-labelledby='filterSearchable-text']
Element should be focused xpath=//input[@aria-labelledby='filterSearchable-text']
11 changes: 5 additions & 6 deletions src/collective/collectionfilter/tiles/search.pt
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,16 @@
class="pat-plone-modal edit-link"><span class="fa fa-pencil"/><label i18n:translate="label-edit-filter">edit</label></a>

<tal:if condition="view/collection|nothing">
<header tal:condition="view/title" tal:content="view/title">Title</header>
<header tal:condition="view/title" tal:content="view/title" id="${string:${view/filterClassName}}">Title</header>
<div class="searchContent">
<form method="get" name="searchForm" role="form" action="${view/action_url}">
<form method="get" name="searchForm" role="search" action="${view/action_url}">
<tal:urlquery repeat="item view/urlquery">
<input type="hidden" name="${python:item[0]}" value="${python:item[1]}"/>
</tal:urlquery>
<input name="SearchableText" type="text"
placeholder="Search"
<input name="SearchableText" type="search"
aria-labelledby="${string:${view/filterClassName}}"
data-url="${view/ajax_url}"
value="${view/value}"
i18n:attributes="placeholder text_search"/>
value="${view/value}"/>
<button type="submit" i18n:translate="button_search">Search</button>
</form>
</div>
Expand Down