Skip to content
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

fix(ui5-view-settings-dialog): provide additional filters count description #11042

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

unazko
Copy link
Contributor

@unazko unazko commented Mar 10, 2025

Fixes: #11040

@unazko unazko marked this pull request as ready for review March 10, 2025 08:19
@unazko unazko requested a review from nnaydenow March 10, 2025 08:30
@@ -292,6 +293,10 @@ class ViewSettingsDialog extends UI5Element {
}
}

get _selectedFiltersLabel() {
return ` ${ViewSettingsDialog.i18nBundle.getText(VSD_SELECTED_FILTER_COUNT)}`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to add it into template literal.

Now, when the item is accessed the screen reader is reading out selected filter criteria instead of item text + counter information.

In OpenUi5 the current when the filter item has selected items inside it it is reading the item's text, counter {number}.

I would suggest you to change this method to function instead of getter that accepts FilterItem and to extract the needed information as follows:

	_selectedFiltersLabel(item: FilterItem) {
		if (item.additionalText) {
			return ViewSettingsDialog.i18nBundle.getText(VSD_SELECTED_FILTER_COUNT, item.text || "", item.additionalText || "");
		}

		return item.text;
	}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ui5-view-settings-dialog]: missing context on numbers used in filter option
2 participants