Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Vue2 已停止開發,若您想繼續使用以便支援 IE11,建議熟讀 https://www.herodevs.com/support/nes-vue
建議直接觀看設計檔案
為無障礙網頁而生的 UI 框架 無障礙,讓你我被世界善待
近年來「以使用者為中心」的概念已深植人心, 而這股力量也開始擴散至無障礙網頁設計領域, 藉由不斷改善網頁的親和力, 期望能達成通用設計的核心概念:Design for All。
Piman 正是為此而生, 從人們日常生活常頻繁接觸的網頁開始著手改善, 所以首要任務便是推廣開發者使用 Piman 開發政府機關網站, 進而應用在產品、官網等地方,如此企業可善盡社會責任,也可與國際趨勢接軌。
降低無障礙網頁開發成本:快速創造出友善的網頁
未來每個網站都會注重無障礙網頁設計:已經成為世紀趨勢,尤其是 UX 意識提升的現在
WTO 統計全球已有超過 10% 以上的人有一定程度的身心障礙:落實 Design for All 精神,讓更多用戶使用
符合臺灣無障礙網頁設計規範的 UI 框架套件不多:為了符合無障礙而修改原始碼容易造成版本鎖死、維護不易
良好的管理設計樣式:完善的 Design System,提升維護與開發效率
我們希望盡可能讓更多人使用 Piman,而對無障礙學習者與切版新手來說, Vue 在技術面上成熟且相對其他框架好上手。
無障礙網頁設計要注意許多技術、結構規範,複製/貼上 html 等方式可能會遺漏細節或誤用,因此我們決定使用 Vue 來製作元件,希望降低錯誤發生機率。
同時為考慮 IE11 的良好支援 ,選擇了 Vue 2 來進行開發。
另外 Vue3 版也在開發中,但只支援現代最新瀏覽器。
歡迎訂閱,我們會將各種有關無障礙網頁設計的資訊分享給您。
建議直接觀看設計檔案
很可惜,我們也很想,但因為每個網站的目標與內容都不相同,排版也不會一樣,所以您還是需要擁有無障礙網頁設計規範的知識來製作網站,Piman 目前提供 Figma 設計稿 、 Vue2 元件以及 Nuxt 2 的 簡易模板。(Vue3、Nuxt3 Template 開發中)
Piman Vue2 版支援現代主流瀏覽器與 IE11,規劃中的 Piman Vue3 版則無支援 IE,這是因為 Vue3 前端框架已經不支援 IE 的關係。
當然有,只要您想要設計無障礙網頁,我們很樂意提供您除了 Piman 之外的資訊。
目前主流 UI 框架應該都有符合無障礙網頁設計規範,例如 Bootstrap,而我們私心推薦的是 IBM 的 Carbon,因爲它包含了三大前端框架,且有完整的 demo 和 文件。 或是可以選擇類似例如:https://headlessui.dev/ 跟 https://www.radix-ui.com/ 等 headless,這些專注在行為上,UI 風格則是自己額外建立。
只不過有一點您可能要注意的是,因為 Piman 是有對臺灣數位發展部的無障礙網路空間服務網規範有特別關注,所以您在使用別的框架時,可能會遇到臺灣規定掃描的軟體 freego 機器掃描掃出來的問題和人工檢測的問題。
另外 Vue2 版有支援 IE 11,可以讓更多相對舊款的設備使用,但同時要注意的是 IE 11 已經停止維護,具有資安風險。如何在無障礙精神與資安問題取得協調,是開發者們需要自行好好評估!
Piman 提供以下資源,從設計到前端開發不再走冤望路
Figma Community:Design System、後台範本設計稿
Design Tips
提供設計師無障礙網頁設計的重點,避免重複踩到前人踩過的地雷。
Figma Template
完善的 Design System, 快速、方便執行無障礙網頁設計。
Vue Components
提供多樣常見的元件, 站在巨人的肩膀上開發!
Nuxt Template
快速開啟無障礙網頁前端專案,省下環境設定的時間。
介紹使用 Form 表單元件
Dropdown 下拉式選單,用在讓使用者針對選取的資料採取下一步互動。點擊按鈕會出現一個懸浮區域,裡面是一系列的選項,外觀與 Select 相似,但與 Select 最大的不同之處在於 Dropdown 點擊選項後觸發選項事件,並且關閉懸浮區域。
model
Object
random
rules
autofocus
Boolean
true
自動聚焦
validate
Function () : Promise({valid: booleaml; error: object})
prop
String
label
String
labelFor
String
required
Boolean
error
Boolean
hint
String
rules
[Object, Array]
model
[Object, Array, Boolean, String, Number]
validate
{ valid: boolean, message: string }
介紹使用 Accordion 手風琴元件
介紹使用 Message 提示訊息元件
Message 提示訊息,通常會用來當 Notification,但 Message 用途不在此限,舉凡通知、錯誤提示、小提醒等都可以使用 Message 來傳遞訊息給使用者,並且還有輕重緩急程度的區別。
提示: 要在 mounted 之後觸發
prefix
emoji, text, Html(danger)
String
text 或 html(但有危險性)
theme
primary, success, warning, danger
String
primary
dangerHTML
Boolean
false
使用 html tag
msg
String
duration
Number
200
出現在螢幕上的時間
vOffset
Number
20
onClose
Function
null
關閉後觸發
Msg( msg | options )
Msg.primary( msg | options )
Msg.success( msg | options )
Msg.warning( msg | options )
Msg.danger( msg | options )
介紹使用 Popover 彈出框元件
Popover 彈出框,通常應用在呈現輔助資訊,例如畫面上空間不夠但是又必須呈現很多說明文字時,就可以使用此種元件。顯示時會懸浮於畫面上,蓋住部分原來網頁。
使用 Popover 可以讓使用者的自由度比較大,若您想要讓使用者更專注在彈出框的情境,建議使用 Dialog 元件。
id
String
random
theme
primary,
success,
warning,
danger,
primary-ghost,
success-ghost,
warning-ghost,
danger-ghost
String
title
String
'Popover'
nopadding
Boolean
size
small,
large
String
disabled
String, Boolean
介紹使用 Select 下拉選項元件
Select 下拉選擇,用在讓使用者針對選取的資料做進一步的篩選,或是與選項按鈕一樣,選一個特定值。點擊按鈕會出現一個懸浮區域,裡面是一系列的選項,外觀與 Dropdown 相似,但與 Dropdown 最大的不同之處在於 Select 點擊選項後,值變成選項內容,並且關閉懸浮區域。
為了不讓外層的 position 狀態影響下拉式選單彈出的位置,需要加上 fixed 修正。
在表單項目 bpa-form-item 裡面使用時,需要一起做搭配。
預設 0.8 秒後啟動 autocomplete 過濾選項,若要手動搜尋:使用 "@search"
Object ()
Piman 無障礙 UI 框架源起
沒辦法要求所有參與人員都深入暸解無障礙規範。
國外的 UI 框架、套件與臺灣規範不盡相符。
機器掃描與人工檢測,導致時程壓力。
應付心態,卻對真正需要幫助的使用者造成困擾。
公司都需要一套 Design System 。
公家機關多數仍要求支援 IE11。
使用者與利益關係人
設計師:快速開啟設計專案,並與前端工程接軌。
切版:可以專注版面,並提示工程師細節。
前端工程:可以專注在優先度更高的事,提升 UX 。
利益關係人:PM 與 QA 進行自我檢測降低風險。
解決方案
Design System 設計稿 (Figma)
各種包裝好的元件 (Vue 2,Vue3 開發中)
簡易專案範本 (Nuxt 2&3)
彙整 Checklist 與 檢測工具
id
String
random
size
small, large
String
v-model
String
options
Array<{ label: string; type?: ‘link’ or ‘external-link’; url: string }>
disabled
Boolean
placeholder
String
theme
primary,
success,
warning,
danger,
primary-ghost,
success-ghost,
warning-ghost,
danger-ghost
String
optionWidth
String
fixed
Boolean
v-slot:prefix
v-slot:affix
listboxClass
String
可以在 listbox 增加 classname
id
String
random
size
small, large
String
v-model
String
options
Array<{ label: string, value: any }> | Array<{ label: string, type: 'group', options: Option[] >
disabled
Boolean
false
disabledClear
Boolean
false
隱藏清除按鈕
placeholder
String
請選擇/select
theme
primary,
success,
warning,
danger,
primary-ghost,
success-ghost,
warning-ghost,
danger-ghost
String
optionWidth
String
fixed
Boolean
false
v-slot:prefix
提示文字的前方客製化區域
v-slot:affix
提示文字的前方客製化區域
toolbar
Array<'search'>
工具列,目前支援 搜尋 search 功能
multiple
'accordion' or undefined
多選,無需給值,若欲摺疊選項則給值 accordion
listboxClass
String
可以在 listbox 增加 classname
search
keyword
搜尋輸入值改變時
input
id
String
random
labelText
String
v-slot:close-text
String
關閉/OFF
v-slot:open-text
String
開啟/ON
change
text
String || Number
id
String
random
name
String
disabled
Boolean
value
String
model
String
total
Number
總共多少項目
currentPage
Number
設定目前所在頁面
pagerCount
Number
5
設定顯示多少個分頁碼
pageSizeOption
Array
[ { label: '10', value: 10 }, { label: '20', value: 20 }, { label: '50', value: 50 }, { label: '100', value: 100 }, ]
可以設定每頁顯示多少個項目的下拉式選單
pageSize
Number
10
每頁多少個項目
layout
Array
['total_item', 'total_page', 'page_size', 'first', 'last', 'jump']
設定要顯示的元件
size
String
按鈕大小
sync-page-param
{currentPage: number}
換頁時觸發
change:page
換頁時觸發
change:pageSize
id
value
[ String, Number ]
size
small, large
type
placeholder
disabled
required
readonly
error
accesskey
disabledClear
Piman 無障礙網頁設計 UI 框架的更新訊息都會在這裡可以看到。
https://github.com/ya-sai/piman/releases
Vue2 停止開發
可以使用 node 18
demo 頁面目前已換上全新後台 layout 範本
修正 package.json
修正文件文字
補上 TAB 的操作方式提示與多國語言。
補上 Select 與 Dropdown 的 aria-control。
修正 Select 與 Dropdown 的 aria-description 與其多國語言。
修正 Select 與 Dropdown 的 placeholder 螢幕報讀的 visually-hidden 方式描述與其多國語言。
修正語法錯誤
新增按鈕有 icon 的範例
修正 Breadcrumb 的 html tag <div>
to <nav>
刪除 accordion 的 aria-selected=”false”
修正表單項目的 aria-live
修正 Readme
Form Error 提示狀態補上驚嘆號標示,避免只使用顏色作為提示。
input, checkbox, select ,Error 狀態使用虛線表示
修正 dropdown placeholder多國語言
將 emoji 都增加 aria-hidden 屬性,避免報讀軟體讀出 emoji 的意思和想表達的意思不一致。
修正 switch 顏色對比。
修正 input type=”password” 的顯示/隱藏 emoji 為 svg,因為原本使用的 顯示 emoji ,在 safari 和 行動裝置上,在 Dialog 裡使用會被拆解成兩個 emoji。
感謝您對 Piman 有興趣!
Piman 的目標是盡量讓通用設計的理念「Design for all」落實在網頁設計上。
在成為開發夥伴之前,請您先花一點點時間閱讀以下項目:
Issue
請先搜尋 Github 上有沒有相關 issue
有的話,可以嘗試解解看
沒有的話可以開一個新 issue
並且使用我們設定的 label
Pull Request
fork repo
clone fork
commit 訊息
feat:新功能
fix:修正 bug
refactor:coding style, project arch, 文件
revert:revert commit
unittest
DO NOT PR dist 資料夾
rebase
PR 到 dev 分支
Tag
release format:x.x.x-{y}.x
介紹使用 Tree 樹狀組織元件
Tree 樹狀組織,顯示一系列相關且有組織層級的資料,可以選擇某些節點,常用於過濾資訊。
data
Array
label
String
show-checkbox
Boolean
false
可以勾選節點
default-expand-all
Boolean
false
預設展開所有節點
id
Number
label
String || Number
children
Array
disabled
Boolean
false
getCheckedNodes
Array
回傳選擇的節點
getCheckedKeys
Array
回傳選擇的節點 key(id)
setCheckedNodes
Array
使用 key(id) (Object) 設置被勾選的節點
setCheckedKeys
Array
使用 key(id) 設置被勾選的節點
resetChecked
清除所有勾選節點
node-check
(data, component)
勾選/取消勾選節點
node-click/node-expand
(data, component)
當節點被勾選/展開
Give someone a program, you frustrate them for a day; teach them how to program, you frustrate them for a lifetime.
—— David Leinweber
開發元件是如此的有趣、有意義,以至於開發者會無時無刻在腦海裡邊寫程式,只為了好用。
在 src/components 建立 .vue 檔。
naming style:Camel Case,以 ‘Bpa’開頭,例如: BpaButton.vue
然後在 .vue 檔使用。
在 /type 資料夾內新增 newFileName}.d.ts 檔案, 然後在 /types/bpa.d.ts 裡註冊
npm run build
複製 /dist
資料夾內容到 Nuxt
import piman from “your-path/piman.umd.js
npm run dev
—— Ash Maurya,