You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by hn...@apache.org on 2020/04/01 14:21:51 UTC
[myfaces-tobago] branch master updated: fix: aria-labelledby for
dropdown menus
This is an automated email from the ASF dual-hosted git repository.
hnoeth pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git
The following commit(s) were added to refs/heads/master by this push:
new 3ef8462 fix: aria-labelledby for dropdown menus
3ef8462 is described below
commit 3ef846273a594ce72cab8e73eafdc16c22b6fe07
Author: Henning Nöth <hn...@apache.org>
AuthorDate: Wed Apr 1 15:53:57 2020 +0200
fix: aria-labelledby for dropdown menus
The aria-labelledby attribute for dropdown menus has now the ID of the button which opens the dropdown menu.
---
.../myfaces/tobago/internal/renderkit/renderer/CommandRendererBase.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/CommandRendererBase.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/CommandRendererBase.java
index 6a9e0ac..a4cbafb 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/CommandRendererBase.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/CommandRendererBase.java
@@ -173,7 +173,7 @@ public abstract class CommandRendererBase extends DecodingCommandRendererBase {
writer.writeClassAttribute(
BootstrapClass.DROPDOWN_MENU,
getDropdownCssItems(facesContext, command));
- writer.writeAttribute(Arias.LABELLEDBY, "dropdownMenuButton", false);
+ writer.writeAttribute(Arias.LABELLEDBY, command.getFieldId(facesContext), false);
writer.writeAttribute(HtmlAttributes.NAME, command.getClientId(facesContext), false);
for (final UIComponent child : component.getChildren()) {