dashboardPage shouldn't create <title> HTML tags if title = NULL
Mkranj opened this issue · comments
Description
I'm using several dashboardPages inside of a navbarPage tabset for a project. Each call to dashboardPage automatically creates a new <title> tag in the finished app's HTML, even though title is set to NULL in dashboardPage, as well as in dashboardHeader. This creates problems, e.g., for screen readers.
Proposed outcome
If title = NULL
in both dashboardPage and dashboardHeader, no additional <title> tags should be generated.
Example of issue
Run the following code snippet, and check the resulting page's source HTML:
ui <- navbarPage(
title = "Actual title",
dashboardPage(
title = NULL,
dashboardHeader(title = NULL),
dashboardSidebar(),
dashboardBody()
)
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
Only <title>Actual title</title> is supposed to be present, but there's also an additional <title></title>
For precedents, consider what happens when setting title = NULL
in the navbarPage. This generates no empty <title></title>, leaving only the one generated by dashboardPage!
If the snippet throws an error, I've wrapped the dashboardPage in a tabPanel:
ui <- navbarPage(
title = "Actual title",
tabPanel(
dashboardPage(
title = NULL,
dashboardHeader(title = NULL),
dashboardSidebar(),
dashboardBody()
)
)
)
server <- function(input, output, session) {
}
shinyApp(ui, server)