Skip to content

Commit

Permalink
venstre kolonne i tabellen skal ha TH rolle (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
SandraLekve authored Jan 20, 2025
1 parent 0c15597 commit def7ab7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/main/kotlin/no/nav/familie/pdf/pdf/PdfElementUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,12 @@ object PdfElementUtils {
// Legger på non-breaking space for at iText sin movePage-funksjon ikke skal feile
add(lagTekstElement(tekst.ifEmpty { "\u00A0" }, if (erUthevet) FontStil.SEMIBOLD else FontStil.REGULAR))
setBorder(Border.NO_BORDER)
if (erVenstreKolonne) setPaddingRight(10f) else setPaddingLeft(10f)
accessibilityProperties.role = StandardRoles.TD
if (erVenstreKolonne) {
setPaddingRight(10f)
accessibilityProperties.role = StandardRoles.TH
} else {
accessibilityProperties.role = StandardRoles.TD
setPaddingLeft(10f)
}
}
}
2 changes: 1 addition & 1 deletion src/test/resources/søknad.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
{
"label": "Adresse",
"verdi": "Charlies vei 13 b\n\n0575 Oslo\n\n"
"verdi": "Charlies vei 13 b\n0575 Oslo"
},
{
"label": "Sivilstatus",
Expand Down

0 comments on commit def7ab7

Please sign in to comment.