Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use HTML element roles #1306

Merged
merged 5 commits into from Jun 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/clj/rems/css/styles.clj
Expand Up @@ -540,8 +540,7 @@
[:.navbar-flex {:display "flex"
:flex-direction "row"
:justify-content "space-between"
:min-width "100%"}
[:nav {:flex 1}]]
:min-width "100%"}]
[(s/> :.form-actions "*:not(:first-child)")
(s/> :.commands "*:not(:first-child)")
{:margin-left (u/em 0.5)}]
Expand Down
2 changes: 1 addition & 1 deletion src/clj/rems/layout.clj
Expand Up @@ -94,7 +94,7 @@ window.rems = {
(when-let [title (error-details :title)]
[:h2.without-margin title])
(when-let [message (error-details :message)]
[:h4.text-danger message])]]]]]])
[:h3.text-danger message])]]]]]])

(defn error-page
"error-details should be a map containing the following keys:
Expand Down
2 changes: 1 addition & 1 deletion src/cljs/rems/actions/action.cljs
Expand Up @@ -43,7 +43,7 @@
`:collapse-id` - optionally the collapse group the action is part of"
[id title buttons content & [{:keys [collapse-id]}]]
[:div.collapse {:id (action-collapse-id id) :data-parent (if collapse-id (str "#" collapse-id) "#actions-forms")}
[:h4.mt-5 title]
[:h3.mt-5 title]
content
(into [:div.col.commands.mr-3 [cancel-action-button id]] buttons)])

Expand Down
2 changes: 1 addition & 1 deletion src/cljs/rems/administration/create_form.cljs
Expand Up @@ -259,7 +259,7 @@
(map-indexed (fn [field-index field]
[:div.form-field {:key field-index}
[:div.form-field-header
[:h4 (text-format :t.create-form/field-n (inc field-index))]
[:h3 (text-format :t.create-form/field-n (inc field-index))]
[:div.form-field-controls
[move-form-field-up-button field-index]
[move-form-field-down-button field-index]
Expand Down
2 changes: 1 addition & 1 deletion src/cljs/rems/administration/create_license.cljs
Expand Up @@ -103,7 +103,7 @@
:update-form ::set-form-field})

(defn- language-heading [language]
[:h2 (str/upper-case (name language))])
[:h3 (str/upper-case (name language))])

(defn- license-title-field [language]
[text-field context {:keys [:localizations language :title]
Expand Down
2 changes: 1 addition & 1 deletion src/cljs/rems/administration/resource.cljs
Expand Up @@ -45,7 +45,7 @@

(defn license-view [license language]
(into [:div.form-item
[:h4 (text-format :t.administration/license-field (get-in license [:localizations language :title]))]
[:h3 (text-format :t.administration/license-field (get-in license [:localizations language :title]))]
[inline-info-field (text :t.administration/title) (:title license)]]
(concat (for [[langcode localization] (:localizations license)]
[inline-info-field (str (text :t.administration/title)
Expand Down
4 changes: 2 additions & 2 deletions src/cljs/rems/administration/workflow.cljs
Expand Up @@ -51,7 +51,7 @@
;; TODO try to unify with resource license-view
(defn license-view [license language]
(into [:div.form-item
[:h4 (text-format :t.administration/license-field (get-localized-value license :title language))]
[:h3 (text-format :t.administration/license-field (get-localized-value license :title language))]
[inline-info-field (text :t.administration/title) (:title license)]]
(concat (for [localization (:localizations license)]
[inline-info-field (str (text :t.administration/title)
Expand Down Expand Up @@ -82,7 +82,7 @@

(defn round-view [actors]
[:div.form-item
[:h4 (text-format :t.create-workflow/round-n (inc (:round (first actors))))]
[:h3 (text-format :t.create-workflow/round-n (inc (:round (first actors))))]
(let [{approvers "approver" reviewers "reviewer"} (group-by :role actors)]
[:div
(when (seq approvers)
Expand Down
10 changes: 5 additions & 5 deletions src/cljs/rems/application.cljs
Expand Up @@ -410,9 +410,9 @@
:always (into [:div
[:div.mb-3 {:class (str "state-" (name state))}
(phases (get-application-phases state))]
[:h4 (text-format :t.applications/latest-activity (localize-time last-activity))]]
[:h3 (text-format :t.applications/latest-activity (localize-time last-activity))]]
(when-let [g (first event-groups)]
(into [[:h4 (text :t.form/events)]]
(into [[:h3 (text :t.form/events)]]
(render-event-groups [g]))))
:collapse (when-let [g (seq (rest event-groups))]
(into [:div]
Expand Down Expand Up @@ -440,9 +440,9 @@
:class (when group? "group")
:always
[:div
(cond (= (:application/applicant application) user-id) [:h5 (text :t.applicant-info/applicant)]
(:userid attributes) [:h5 (text :t.applicant-info/member)]
:else [:h5 (text :t.applicant-info/invited-member)])
[:h3 (cond (= (:application/applicant application) user-id) (text :t.applicant-info/applicant)
(:userid attributes) (text :t.applicant-info/member)
:else (text :t.applicant-info/invited-member))]
(when-let [name (or (:commonName attributes) (:name attributes))]
[info-field (text :t.applicant-info/name) name {:inline? true}])
(when user-id
Expand Down
2 changes: 1 addition & 1 deletion src/cljs/rems/collapsible.cljs
Expand Up @@ -5,7 +5,7 @@

(defn- header
[title title-class]
[:div.card-header {:class (or title-class "rems-card-header")} title])
[:h2.card-header {:class (or title-class "rems-card-header")} title])

(defn- show-more-button
[id expanded callback]
Expand Down
4 changes: 2 additions & 2 deletions src/cljs/rems/navbar.cljs
Expand Up @@ -57,8 +57,8 @@
[language-switcher]]))

(defn navbar-normal [page-id identity]
[:div.navbar-flex
[:nav.navbar.navbar-expand-sm {:role "navigation"}
[:nav.navbar-flex
[:div.navbar.navbar-expand-sm.flex-fill
[:button.navbar-toggler
{:type :button :data-toggle "collapse" :data-target "#small-navbar"}
"\u2630"]
Expand Down
13 changes: 7 additions & 6 deletions src/cljs/rems/spa.cljs
Expand Up @@ -238,12 +238,13 @@

(defn footer []
[:footer.footer
[:div.container [:nav.navbar
[:div.navbar-text (text :t/footer)]
(when-let [{:keys [version revision repo-url]} (read-current-version)]
[:div#footer-release-number
[:a {:href (str repo-url revision)}
version]])]]])
[:div.container
[:div.navbar
[:div.navbar-text (text :t/footer)]
(when-let [{:keys [version revision repo-url]} (read-current-version)]
[:div#footer-release-number
[:a {:href (str repo-url revision)}
version]])]]])

(defn logo []
[:div.logo [:div.container.img]])
Expand Down