Repository navigation
Bootstrap 5 modernization: themes, accessibility, forms, and admin polish - #853
Merged
Merged
Conversation
```
Modernize built-in themes for Bootstrap 5 and add Flatly
Aligns every shipped theme with Bootstrap 5.3 idioms and removes
Bootstrap 4 leftovers that were causing layout and styling drift.
Also introduces Flatly as a sixth built-in theme.
Themes
- Add Flatly theme (Bootswatch swatch) with full partial set, custom
overrides, and default SVG. Registered in ThemeManager defaults and
covered by ThemeManagerTest (theme count 5 -> 6, IsBuiltIn case
added).
- Switch Darkly to its Bootswatch palette: load
~/lib/bootswatch/5.3.8/darkly/bootstrap.min.css and replace
`navbar-dark bg-dark` with `bg-dark` + `data-bs-theme="dark"` per
the Bootstrap 5.3 color-mode API. Clarifying comments on the pinned
`dasblog-theme` / `data-bs-theme` script so the Bootswatch palette
pairing is obvious.
- Drop the Bootstrap 4 `.jumbotron` class from darkly and dasblog
`_BlogPageSummary.cshtml` (removed in BS5).
- Add Font Awesome 6.7.2 stylesheet link to darkly, flamingo,
kindofblue, and median layouts (previously implicit / missing).
- Trim darkly/custom.css from ~11k lines to overrides only (the file
was a vendored copy of full Bootstrap); trim median/custom.css to
the override set and remove the now-orphan median/custom.js.
Assets
- Add wwwroot/lib/bootswatch/5.3.8/{darkly,flatly}/bootstrap.min.css.
ThemeManager
- Add "flatly" to the built-in default list so it is recognized
alongside darkly, dasblog, flamingo, kindofblue, and median.
No engine routing, controller, or tag-helper changes. Theme-only and
ThemeManager defaults.
Expanded DefaultSources max length from 50 to 600 characters in SiteViewModel. Updated the admin security view to make the DefaultSources input field full width for better usability with longer values.
Refreshed Flatly and other themes to use blue or custom accent palettes instead of Bootswatch green. Remapped Bootstrap utility classes (.btn-primary, .bg-primary, etc.) to theme colors for consistent branding. Updated archive navigation, calendar icons, and badges for better readability and cohesion. Simplified site title link and made minor CSS improvements for accessibility and visual consistency. Updated Flatly SVG preview to match new palette.
Removed aria-hidden="true" from all Bootstrap modal elements in ConfirmationModalTagHelper.cs, ManageComments.cshtml, _HeroImagePickerModal.cshtml, and site.js to improve accessibility and align with current ARIA and Bootstrap best practices.
Improved browser autofill and accessibility by specifying autocomplete attributes for login (username, current-password), comment (name, email, url), and anti-spam (off) input fields.
The aria-hidden="true" attribute was removed from the modal's outer <div> in the generated HTML. This change ensures the modal is not hidden from assistive technologies by default, improving accessibility compliance.
Switched sidebar menu button from btn-default to btn-secondary in _Layout.cshtml. Removed .btn-default styles from custom.css, so only .btn-secondary receives the intended button styling and hover effects.
Updated the blog page summary section to improve layout and spacing: - Added mb-4 to the outer container for more bottom margin - Changed inner column to col-md-12 for full-width display - Added mb-3 to the h1 heading for better vertical spacing
Updated summary header with custom colors and full-width layout, adjusted subtitle spacing, and enhanced <post-image> with consistent sizing and object-fit. Minor markup tweaks improve visual consistency across summary sections.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR brings the shipped themes and several rough edges of the admin/comment UI in line with Bootstrap 5.3 and current accessibility guidance. It also unblocks longer CSP DefaultSources values in the admin Security page.
Removed the static aria-hidden="true" attribute from every modal's outer .modal div. Bootstrap 5 manages this attribute dynamically; leaving it hard-coded on the wrapper causes screen readers to ignore the open modal and trips Chrome's accessibility audit. Applies to:
Added the autocomplete attribute on fields where it's expected by password managers and WCAG 1.3.5:
This unblocks anyone whose CSP default-src list grows past the old 50-char ceiling (which the previous limit hit almost immediately on any real install).
Out of scope