Skip to content
Open
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
7 changes: 6 additions & 1 deletion src/templates/bootstrap4/input/form.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@
<span aria-live="assertive" id="{{ctx.instance.id}}-liveRegion" class="sr-only" ref="liveRegion"></span>
{% } %}
{% if (ctx.suffix) { %}
<div class="input-group-append" ref="suffix">
<div class="input-group-append"
ref="suffix"
{% if (ctx.readOnly) { %}
role="presentation"
{% } %}
>
<span class="input-group-text">
{% if(ctx.suffix instanceof HTMLElement){ %}
{{ ctx.t(ctx.suffix.outerHTML, { _userInput: true }) }}
Expand Down
9 changes: 7 additions & 2 deletions src/templates/bootstrap5/input/form.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@
<span aria-live="assertive" id="{{ctx.instance.id}}-liveRegion" class="visually-hidden" ref="liveRegion"></span>
{% } %}
{% if (ctx.suffix) { %}
<div class="input-group-text" ref="suffix">
<div class="input-group-text"
ref="suffix"
{% if (ctx.readOnly) { %}
role="presentation"
{% } %}
>
{% if(ctx.suffix instanceof HTMLElement){ %}
{{ ctx.t(ctx.suffix.outerHTML, { _userInput: true }) }}
{% } else{ %}
Expand All @@ -53,7 +58,7 @@
</div>
{% } %}
{% if (ctx.component.showCharCount || ctx.component.showWordCount) { %}
<div class="form-text {{ctx.component.description ? float-end : text-end">
<div class="form-text {{ctx.component.description ? 'float-end' : 'text-end'}}">
{% if (ctx.component.showCharCount) { %}
<span class="text-muted" ref="charcount" aria-live="polite"></span>
{% } %}
Expand Down
Loading