Security and Macros in Word Documents
Documents containing macros or active content can have accessibility implications. While macros themselves aren't inherently inaccessible, they require special consideration to ensure they work with assistive technology.
What This Means
Macros are automated scripts that perform actions in Word documents. If your document contains macros, you should ensure any functionality they provide is accessible to users who rely on keyboards or screen readers.
Why It Matters
- Security warnings can confuse users when opening documents
- Macro-driven features may not work with screen readers
- Keyboard accessibility must be maintained for all macro functions
- Alternative workflows should exist for users who disable macros
Common Violations
DOCX-10-001: Document Contains Macros or Active Content {#DOCX-10-001}
What's Wrong: The document contains macros or other active content that may present accessibility challenges.
Impact: Minor - This is informational; macros aren't inherently inaccessible but require attention.
How to Identify:
- When you open the document, you may see a security warning
- Check File > Options > Trust Center for macro settings
- Go to View > Macros to see if any macros exist
Common Macro Uses:
- Form automation
- Custom navigation buttons
- Document protection workflows
- Automated formatting
Accessibility Considerations for Macros
Keyboard Accessibility
Any functionality provided by macros should be:
- Accessible via keyboard shortcuts
- Available through standard menu commands
- Operable without requiring mouse clicks
Assigning Keyboard Shortcuts to Macros:
- Go to File > Options > Customize Ribbon
- Click Customize next to Keyboard shortcuts
- In Categories, select Macros
- Select your macro
- Assign a keyboard shortcut
- Click Assign
Screen Reader Compatibility
Macro-driven features should:
- Provide feedback that screen readers can announce
- Not interfere with standard screen reader navigation
- Include status messages using accessible methods
Error Handling
Macros should:
- Display error messages in accessible dialog boxes
- Not assume users can see visual indicators
- Provide clear instructions for resolving issues
Alternatives to Macros
Consider whether macros are necessary:
For Form Fields:
- Use Word's built-in content controls instead
- These are more accessible than macro-driven forms
For Navigation:
- Use headings and the Navigation Pane
- Use bookmarks and hyperlinks
For Formatting:
- Use styles and templates
- Use Quick Parts for reusable content
For Protection:
- Use Word's built-in protection features
- Use Restrict Editing instead of macro-based locks
Best Practices for Accessible Macros
Do:
- Assign keyboard shortcuts to all macro functions
- Test macros with screen readers
- Provide alternative ways to accomplish tasks
- Document macro functionality and shortcuts
- Use accessible message boxes for user feedback
Don't:
- Require mouse interaction for macro features
- Rely solely on visual feedback
- Block screen reader navigation
- Assume all users can enable macros
Macro Security Settings
Users may disable macros for security:
- Disable all macros without notification - Macros won't run at all
- Disable all macros with notification - Users can choose to enable
- Disable all macros except digitally signed - Only trusted macros run
- Enable all macros - All macros run (not recommended)
For Accessible Documents:
- Ensure core document content is accessible without macros
- Macro features should enhance, not replace, standard functionality
Creating Accessible Macro Forms
If using macros for forms:
- Label all form fields - Use descriptive labels next to fields
- Provide instructions - Explain how to complete the form
- Use Tab order - Ensure logical keyboard navigation
- Include error messages - Accessible feedback for validation
- Consider built-in alternatives - Content controls may be more accessible
Document Security Without Macros
Word provides built-in security features:
Restrict Editing
- Go to Review > Restrict Editing
- Choose formatting or editing restrictions
- Set a password if needed
Mark as Final
- Go to File > Info > Protect Document
- Select Mark as Final
- Document becomes read-only (but can be edited if needed)
Password Protection
- Go to File > Info > Protect Document
- Select Encrypt with Password
- Note: This doesn't affect accessibility, just access