Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion api/src/org/labkey/api/query/AbstractNestableDataRegion.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

import static org.labkey.api.util.DOM.A;
import static org.labkey.api.util.DOM.Attribute.align;
import static org.labkey.api.util.DOM.Attribute.alt;
import static org.labkey.api.util.DOM.Attribute.colspan;
import static org.labkey.api.util.DOM.Attribute.id;
import static org.labkey.api.util.DOM.Attribute.src;
Expand Down Expand Up @@ -94,7 +95,8 @@ protected void renderExtraRecordSelectorContent(RenderContext ctx, HtmlWriter ou
at(
id, getName() + "-Handle" + value,
valign, "middle",
src, ctx.getViewContext().getContextPath() + "/_images/" + (_expanded ? "minus" : "plus") + ".gif"
src, ctx.getViewContext().getContextPath() + "/_images/" + (_expanded ? "minus" : "plus") + ".gif",
alt, _expanded ? "Collapse row" : "Expand row"
)
)
).appendTo(out);
Expand Down
17 changes: 17 additions & 0 deletions api/src/org/labkey/api/util/DOM.java
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,23 @@ public _Attributes data(boolean condition, String datakey, Object value)
}
return this;
}
public _Attributes aria(String ariakey, Object value)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I propose we wait for this other PR to merge that adds support for aria-* in a slightly different way, and consolidate on that.

{
if (null == expandos)
expandos = new ArrayList<>();
expandos.add(new Pair<>("aria-" + ariakey,value));
return this;
}
public _Attributes aria(boolean condition, String ariakey, Object value)
{
if (condition)
{
if (null == expandos)
expandos = new ArrayList<>();
expandos.add(new Pair<>("aria-" + ariakey,value));
}
return this;
}

public _Attributes cl(String...names)
{
Expand Down
3 changes: 2 additions & 1 deletion api/src/org/labkey/api/util/LinkBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ public Appendable appendTo(Appendable out)
.at(!lb.enabled, disabled, true)
.data(null != lb.tooltip, "tt", "tooltip")
.data(null != lb.tooltip, "placement","top")
.data(null != lb.tooltip, "original-title", lb.tooltip),
.data(null != lb.tooltip, "original-title", lb.tooltip)
.aria(lb.iconCls != null && lb.tooltip != null, "label", lb.tooltip),
(lb.iconCls != null ? null : lb.html)
).appendTo(out);
}
Expand Down
2 changes: 1 addition & 1 deletion api/webapp/clientapi/ext3/PersistentToolTip.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ LABKEY.ext.CalloutTip = Ext.extend(LABKEY.ext.PersistentToolTip, {
if (!this.targetAutoEl) {
this.targetAutoEl =
'<span class="labkey-callout-tip' + (this.leftPlacement ? ' labkey-callout-tip-left' : '' ) + '">' +
'<img src="' + LABKEY.contextPath + '/_.gif">' +
'<img src="' + LABKEY.contextPath + '/_.gif" alt="Show details">' +
'</span>';
}

Expand Down
Loading