Skip to content

Commit 0b6981b

Browse files
javier-godoypaodb
authored andcommitted
feat: use h1/div instead of h3/h4
Use structural headings for conveying the dialog structure. Close #29
1 parent 1d40aa7 commit 0b6981b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main/java/com/flowingcode/vaadin/addons/errorwindow/ErrorWindow.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ private VerticalLayout createMainLayout() {
129129
final Html title =
130130
new Html(
131131
String.format(
132-
"<h3 style='margin-top:0px;text-align:center'>%s</h3>", i18n.getCaption()));
132+
"<h1 style='margin-top: 0; text-align: center; font-size: var(--lumo-font-size-xl);'>%s</h1>",
133+
i18n.getCaption()));
134+
133135
title.getElement().getStyle().set("width", "100%");
134136
mainLayout.add(title);
135137

@@ -201,7 +203,8 @@ protected Html createErrorLabel() {
201203
label =
202204
label.concat(
203205
String.format(
204-
"<br />%s<h4><p><center>%s<center/></p></h4>", i18n.getInstructions(), uuid));
206+
"<br />%s<div style='text-align: center; font-weight: 600; font-size: var(--lumo-font-size-l); margin-top: 1em;'>%s</div>",
207+
i18n.getInstructions(), uuid));
205208
}
206209
final Html errorLabel = new Html("<span>" + label + "</span>");
207210
errorLabel.getElement().getStyle().set("width", "100%");

0 commit comments

Comments
 (0)