You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 035fa61
Browse filesBrowse the repository at this point in the historyBrowse files
Add create_new_text and no_results_text, and announce the create row of searchable selects (#1700)
* Render the create row and the no-results text of searchable selects
Pass render.option_create and render.no_results to Tom Select, with the texts from data-create_new_text and data no_results_text and the current English texts as default. The create row also gets role="option" and an id:
Tom Select gives both only to regular options, so screen readers did not announce the create row when it was the active option.
* Pass create_new_text and no_results_text to the select dropdown
* Document create_new_text and no_results_text
* Add changelog entry for the select dropdown texts
* Add select dropdown texts fixture page
* Test the dropdown texts and the active create row
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
3
3
## unreleased
4
4
5
+
- New `create_new_text` and `no_results_text` properties on `select` fields translate the dropdown texts "Add …" and "No results found". The row that creates a new value is now announced by screen readers when it is the active option. ([#1699](https://github.com/sqlpage/SQLPage/issues/1699))
5
6
- The `table` component can fetch and display HTML fragments in selected columns using `embed`.
6
7
- New `navbar_toggle_label` property on the `shell` and `close_label` property on the `alert` component, to translate the accessible names of the menu toggle button and of the alert close button. ([#1632](https://github.com/sqlpage/SQLPage/issues/1632))
7
8
- Updated Rust and browser dependencies, including SQLite, ApexCharts, and Tabler.
Copy file name to clipboardExpand all lines: examples/official-site/sqlpage/migrations/01_documentation.sql
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -317,6 +317,8 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S
317
317
('searchable', 'For select and multiple-select elements, displays them with a nice dropdown that allows searching for options.', 'BOOLEAN', FALSE, TRUE),
318
318
('dropdown', 'An alias for "searchable".', 'BOOLEAN', FALSE, TRUE),
319
319
('create_new', 'In a select with a dropdown (`searchable`, `dropdown` or `options_source`), this option allows the user to enter new values, that are not in the list of options. Works for single selects and for multiselects.', 'BOOLEAN', FALSE, TRUE),
320
+
('create_new_text', 'Text shown before the typed value in the dropdown row that creates a new value, when `create_new` is set. Replaces the default "Add", for instance to translate it.', 'TEXT', FALSE, TRUE),
321
+
('no_results_text', 'Text shown in a select with a dropdown when the search matches no option. Replaces the default "No results found", for instance to translate it.', 'TEXT', FALSE, TRUE),
320
322
('step', 'The increment of values in an input of type number. Set to 1 to allow only integers.', 'REAL', FALSE, TRUE),
321
323
('description', 'A helper text to display near the input field.', 'TEXT', FALSE, TRUE),
322
324
('description_md', 'A helper text to display near the input field - formatted using markdown.', 'TEXT', FALSE, TRUE),
0 commit comments