NEW
Font size
WorksheetsAccessibility in Web Development Quiz
Total questions: 73
Worksheet time: 37mins
Why is semantic HTML important when building pages that work well with assistive technologies?
A) It replaces the need for progressive enhancement because scripts handle all accessibility.
B) It forces every component to use ARIA roles even when native semantics already exist.
C) It preserves meaningful structure that AT can interpret correctly without relying on visual styling.
D) It ensures automated SEO tools apply fixed rankings regardless of content hierarchy.
What is the primary purpose of using ARIA roles when standard HTML elements cannot express the required behavior or structure?
A) They guarantee that all dynamic UI updates are announced visually without requiring additional logic.
B) They replace the need for keyboard-friendly interaction patterns by simulating default browser controls.
C) They provide assistive technologies with semantic meaning that native HTML cannot convey in complex custom components.
D) They allow developers to bypass semantic HTML so all elements can be freely styled as plain containers.
What is the main purpose of using a “screen-reader-only” technique such as the modern .sr-only CSS class?
A) It converts icons into captions so graphical elements behave like full text labels.
B) It forces browsers to replace background images with readable labels automatically.
C) It blocks hidden text from search engines to avoid duplicate semantic information.
D) It hides text visually while keeping it accessible to assistive tools that rely on the DOM.
Why should accessible components avoid relying solely on hover-based interactions?
A) Because hover states load additional fonts that reduce UI performance.
B) Because hover states are not accessible to users relying on keyboard navigation or touch devices.
C) Because hover states increase the complexity of CSS frameworks.
D) Because hover states are only supported in modern browsers.
Why should developers avoid assigning positive (non-zero) tabindex values when managing keyboard navigation?
It disables default focus behavior so custom JavaScript handlers must replace it.
It prevents screen readers from detecting dynamic updates triggered by scripted UI changes.
It guarantees that AT tools skip elements automatically regardless of their position.
It can create inconsistent navigation order that breaks alignment between visual flow and DOM structure.
It forces all interactive elements to require ARIA roles even when native semantics exist.
What is the primary purpose of programmatically restoring focus after an interactive element is removed from the DOM?
It converts all removed components into static content visible only to assistive tools.
It forces screen readers to re-announce all page regions regardless of user context.
It disables default navigation so custom keyboard shortcuts replace the tab sequence.
It prevents unexpected focus loss that would otherwise send keyboard users back to the top of the page.
It refreshes the DOM tree to ensure hidden elements are permanently discarded.
Why is it generally recommended to use button elements instead of a for actions in web apps?
button triggers background scripts that conflict with ARIA attributes by default.
button correctly conveys action semantics to assistive technologies, improving accessibility.
button forces screen readers to ignore all nearby links, simplifying navigation.
a tags are deprecated in HTML and cannot be styled consistently across browsers.
Which statement best explains what an injection attack is in web applications?
It occurs when untrusted input becomes mixed with trusted data and alters how a query or command is interpreted.
It arises when validated data interacts with browser elements and unexpectedly shifts structural page logic.
It emerges when mismanaged request information blends with system routines and affects internal processing workflows in unpredictable ways.
It appears when formatted parameters collide with components and generate unintended operational outcomes.
It happens when trusted input is processed incorrectly and produces unexpected control behavior in modules.
Why is output encoding effective at preventing XSS attacks?
Because encoding neutralizes script injection by treating malicious input as text.
Because encoded values increase CPU load making attacks harder.
Because encoded output disables caching for security-related content.
Because encoding forces browsers to ignore all client-side logic.
Because encoding blocks all inline styling from loading on the page.
What is considered the "golden rule" when handling user input in web applications?
Validate only administrative input while skipping normal users' data checks.
Always log user input without validation to ensure comprehensive auditing.
Never validate input and rely solely on firewall protection against attacks.
Sanitize input aggressively and ignore validation for faster processing.
Validate input from users and sanitize output before displaying it.
What is the main risk of insecure direct object references (IDOR) in web applications?
Unauthorized access to sensitive data or resources.
Increased CPU load due to inefficient processing.
Disabling of browser-side security features.
Loss of inline styling and page formatting.
What is the main purpose of salting a password hash in web applications?
To create a visually complex password that contains numbers, symbols, and capital letters automatically.
To store a backup copy of the original password in a separate database for verification purposes.
To combine multiple passwords together so that users must enter several secrets at login.
To add a unique random value to each password hash, making dictionary attacks and hash collisions more difficult.
To strengthen password security by appending a secret and unique random string to each hash, slowing attackers and preventing reuse of identical hashes across accounts.
Why should passwords be hashed rather than encrypted with a reversible method?
Because hashing requires fewer code changes during deployments.
Because hashing allows faster authentication under heavy traffic.
Because encrypted passwords automatically expire after a session.
Because encrypted passwords synchronize more slowly across servers.
Because hashing makes stolen password data unusable to attackers.
Why use HTTPS for all production traffic, even for non-sensitive endpoints?
Because encrypted traffic disables caching to improve data freshness.
Because HTTPS forces clients to refresh tokens after every request.
Because HTTPS removes latency associated with round-trip requests.
Because HTTPS ensures encrypted communication, protecting data integrity and confidentiality.
Why should session tokens be rotated periodically?
A) Because token rotation is needed only when the UI theme changes.
B) Because token rotation ensures faster garbage collection in memory.
C) Because rotation limits the usefulness of a compromised token.
D) Because session tokens degrade visually when reused too often.
E) Because rotating tokens increases the accuracy of analytics tracking.
What does the DREAD model help security professionals do?
A) Define the architecture of a system and its interface contracts for distributed components.
B) Automatically generate checklists for code reviews without human verification.
C) Prioritize firewall rules and network configurations to reduce external attacks.
D) Create input validation and sanitization rules for all user-submitted data in web apps.
E) Assign a score to threats based on damage, reproducibility, exploitability, users affected, and discoverability.
Why is it important to integrate security into the design and development of web applications?
A) Because adding security only at the end of development ensures all vulnerabilities are automatically fixed.
B) Because using complex passwords alone guarantees that the system cannot be compromised in any way.
C) Because outsourcing all security responsibilities to external tools eliminates the need for developer involvement.
D) Because relying solely on security by obscurity or a single layer of protection provides comprehensive defense against all possible attacks.
E) Because a system is only as secure as its weakest point, requiring careful planning to prevent unauthorized access.
What is the recommended way to handle secrets like API keys or passwords in a web application?
A) Store them in plain text files for easy access.
B) Hard-code them into the application source code.
C) Use environment variables or secure vaults to store them.
D) Share them openly with all team members for collaboration.
Why is versioning important when evolving an API over time?
Because versioning allows changes without breaking existing client integrations.
Because versioning eliminates the need for load balancing in microservices.
Because version numbers dictate server memory allocation policies.
Because API upgrades automatically propagate when no version is defined.
Because version tags determine which database schema is active.
Why should error responses in APIs follow a predictable structure?
Because consistent formatting helps clients handle issues programmatically.
Because structured errors eliminate the need for API versioning entirely.
Because predictable structures reduce storage cost for archived logs.
Because error formats directly affect database indexing and search speed.
Because varied error formats improve logging diversity across environments.
When designing an API, which approach is recommended for handling client errors such as invalid requests?
Always redirect the user to the home page without explanation.
Display a plain text message in the browser console only.
Return a structured JSON error message detailing the issue.
Ignore the error and allow the request to proceed.
Which HTTP method is typically used to partially update a resource without replacing its entire content?
PUT
POST
GET
DELETE
PATCH
Which HTTP status code indicates that a request has succeeded and the server has returned the expected response?
400 Bad Request
404 Not Found
302 Found
201 Created
200 OK
What is the primary purpose of the BFF (Backends-For-Frontends) pattern in API design?
To replace the need for any authentication or validation on both front-end and back-end layers.
To enforce that all front-end logic must be implemented in the back-end API layer.
To simplify front-end interactions with a complex back-end API while adding validation and security.
To make the back-end API accessible publicly to all clients for easier integration.
To require every front-end request to access the back-end API directly without any intermediary.
Why is API input validation a best practice even when clients are trusted?
Because trusted systems never change their behavior once deployed.
Because validation allows the API to automatically retry failed requests.
Because validation mainly reduces payload size for improved performance.
Because input validation prevents caching mistakes in downstream services.
Because trusted clients can still send malformed or unexpected data that can harm internal logic.
What is the main advantage of using REST over SOAP for web APIs?
REST mandates a single URL endpoint for all API requests regardless of resource type.
REST can only be used with XML, limiting the formats supported for responses.
REST requires strict schemas and additional tools for request formatting and debugging.
REST reuses standard HTTP mechanisms, making requests simpler without special libraries.
REST does not support caching or stateless interactions, which SOAP handles automatically.
Why are indexes important in databases when querying large datasets?
They allow the database to quickly locate records without scanning the entire table.
They guarantee ACID transactions automatically.
They remove the need for primary keys.
They store full table copies in memory.
They prevent replication lag.
Why are foreign key constraints crucial in relational systems?
Because relational databases require no validation when constraints are absent.
Because foreign keys reduce application logic and remove the need for caching.
Because constraints only exist to reduce physical disk usage.
Because foreign keys improve UI responsiveness in large dashboards.
Because they prevent inconsistent relationships and maintain data integrity.
Why are database migrations important in application development?
They permanently lock the database schema so no changes can be made in the future.
They automatically improve the performance of all database queries without any developer input.
They convert NoSQL databases into relational databases to simplify data handling.
They allow developers to update the database schema as the application evolves.
What does the “Durable” property in ACID transactions ensure for a database?
Once a transaction is committed, its changes remain even if the server is restarted or crashes.
The transaction can be rolled back after commit without logging.
Transactions never run concurrently.
Only read queries are allowed in transactions.
The database automatically deletes old data.
Which of the following best describes a robust database backup strategy?
Using both replication for real-time recovery and periodic database dumps for protection against all types of data loss.
Only replication is enough for any situation.
Only daily dumps are always enough.
Backups should be stored on the same server for speed.
Backups are optional if you use a cloud DB.
What is the main difference between a key-value store and a document store in NoSQL databases?
A key-value store is always distributed across multiple machines, whereas a document store must run on a single server.
A key-value store retrieves data only by a unique key, while a document store allows queries based on the content inside the document.
A key-value store stores data in tables with rows and columns, while a document store stores all data as plain text files.
A key-value store is optimized for graph traversal, while a document store only allows sequential reads.
A key-value store always guarantees ACID transactions, whereas a document store cannot store structured data.
Why must database schemas be designed with future scalability in mind?
Because relational constraints reduce performance under all conditions.
Because scalable schema models eliminate the need for indexes.
Because unplanned schemas work fine as long as queries are optimized.
Why is it important to keep development, staging, and production environments as close as possible?
Using completely different tools in each environment improves testing coverage.
Allowing major differences in OS, tooling, and configurations between environments ensures flexibility but may introduce subtle bugs and deployment failures.
Minimizing differences reduces environment-specific bugs and increases confidence in deployments.
Large time gaps between environments help identify hidden production issues.
Developers should only test code on their local machines to ensure speed.
What is the main purpose of using tools like Vagrant or containers for development environments?
They allow developers to create reproducible environments that match production as closely as possible.
Containers and Vagrant can replace all infrastructure management, including firewalls and scaling.
Developers must manually install all dependencies on each machine for consistency.
They eliminate the need for any deployment scripts or automation entirely.
They are intended to run production workloads directly without configuration changes.
Why is it important to consider deployment early in the web application development process?
Because ignoring deployment considerations cannot lead to scalability issues.
Because deployment constraints can affect design decisions like session storage and file handling.
Because deployment only matters after the application is fully built and tested.
Because developers do not need to understand the environment their app will run in.
Why must environment-specific configuration never be stored in code?
Because configuration rarely changes, so storing it in code has no effect.
Because code-based config loads faster on multi-core processors.
Because environment config makes deployment pipelines optional.
Because environment variables reduce browser request sizes.
Because embedding configuration risks exposing sensitive data and limits portability.
What is the recommended approach for deploying code in a 12-factor application?
Use different deployment methods for each environment to ensure flexibility.
Always SSH into the server and manually install dependencies before running the app.
Deploy directly from source control to always run the latest code.
Skip packaging and rely on the dev environment to provide all runtime dependencies.
Deploy a packaged version of the app rather than checking out source code directly on the server.
According to the material, why must the Build, Release, Run phases remain strictly separated?
Keeping these phases separate prevents developers from tagging commits in version control.
This ensures all configuration changes automatically rebuild the source code.
Separating build, release, and run ensures consistent, traceable deployments, enables predictable rollbacks, and prevents runtime failures caused by missing dependencies or on-the-fly asset compilation.
Frameworks mandate performing all asset transformations during execution.
Strict separation guarantees that dependency servers never fail.
What is the main principle of executing an app as one or more stateless processes?
The app should keep session data in memory for faster access.
The app should store session data externally to ensure scalability and reliability.
The app should use stateful processes to manage user sessions effectively.
The app should rely on local storage for session data to reduce latency.
Why do stateless applications scale horizontally more easily?
Because stateful apps cannot handle caching layers efficiently.
Because statelessness removes the need for distributed tracing tools.
Because stateless apps force clients to store all server logic.
Because stateless nodes always run faster than stateful ones regardless of load.
Because nodes can be added without replicating unique local session data.
What is the main principle of immutable infrastructure in DevOps?
Updates are made incrementally on live servers to avoid downtime.
Immutable infrastructure applies only to test environments.
Only the code changes; infrastructure is modified in place.
Infrastructure should be manually tweaked after deployment.
Once deployed, infrastructure and code are never changed; updates are made by replacing components with new versions.
Why is immutable infrastructure more reliable than mutable servers?
Because immutability forces all apps to use the same database schema.
Because immutable servers replace the need for application logging.
Because immutable hosts automatically upgrade dependencies.
Because mutability only affects frontend caches, not backends.
Because immutability eliminates configuration drift between deployments.
What is the primary focus of DevOps within a full stack team?
The team as a whole is responsible for how the software behaves in production and must address issues that arise.
Developers should focus only on writing code while operations handle production independently.
DevOps mainly involves using automation tools without changing culture/responsibility.
The responsibility for production issues lies with external support teams.
DevOps means separating development and operations completely.
What is the primary purpose of monitoring in a DevOps environment?
To rely on users reporting issues as the main indicator of problems.
To track every possible detail for exhaustive analysis even if it doesn’t prevent outages.
To collect data mainly for post-mortems without real-time alerts.
To replace the need for on-call staff by automatically fixing incidents.
To detect potential problems early through metrics and logs, allowing response before users are affected.
According to the text, what is a key practice for effective monitoring and logging in a production system?
Automatically fix errors without logging/metrics.
Collect all logs together without separation.
Store every possible piece of data (including sensitive info) in one log.
Focus only on business KPIs and analytics.
Separate logs by concern, capture sufficient context for errors, and set meaningful metrics and alerts to detect issues early.
Why should logs be collected as continuous event streams?
Because streaming guarantees no duplicates.
Because event streams automatically compress themselves without storage cost.
Because page rendering depends directly on streaming log throughput.
Because log streaming replaces the need for alerting systems entirely.
What is the main purpose of root-cause analysis and incident management in a DevOps team?
To separate dev and ops completely and leave incidents to ops only.
To rely solely on user reports to detect failures.
To track every minor change to fully automate incident prevention.
To focus only on fixing the immediate issue without recording steps.
To resolve incidents quickly, document actions, and identify underlying causes to prevent future occurrences.
Why are blameless post-mortems recommended after incidents?
Because assigning blame helps identify which team needs fewer engineers.
Because incident reviews should focus on rewriting user documentation.
Because post-mortems should measure UI satisfaction rather than root causes.
Because the goal is to reduce monitoring alerts only.
Because they encourage honest analysis focused on systemic improvement.
According to the text, what is a key element of an effective runbook for handling incidents?
It should contain every possible technical detail even if irrelevant to response.
It only needs general advice and high-level guidance.
It primarily lists previous incidents without steps/contacts.
It replaces the need for an on-call system by fixing incidents automatically.
It should provide detailed step-by-step procedures, contact paths, and escalation instructions.
Why must alerts remain actionable rather than overly noisy?
Because alerts should always fire regardless of severity.
Because thresholds should never be adjusted.
Because noisy alerts improve accuracy by overwhelming the team.
Because noise increases alert durability for storage.
Because actionable alerts let engineers focus on real issues instead of filtering distractions.
Why is proactive monitoring vital for production reliability?
Because high-volume traffic negates the need for alerting.
Because monitoring tools require user action to trigger events.
Because proactive systems replace the need for load balancers.
Because metrics remain accurate only when monitoring is disabled.
Because monitoring reveals early signs of failure before they affect users.
Why is capacity planning essential before peak traffic events?
Because peak traffic reduces required memory usage.
Because capacity increases only when endpoints return HTTP 500.
Because hardware adds capacity automatically during downtime.
Because unplanned scaling always leads to faster response times.
Because planning ensures the system can handle expected load without degradation.
What is the role of infrastructure in a DevOps environment?
Infrastructure only refers to physical servers that developers must manually configure.
Infrastructure is limited to third-party cloud services only.
Infrastructure is solely the responsibility of sysadmins.
Infrastructure only includes load balancers and CDNs.
Infrastructure provides computing resources, networking, and services that allow applications to run and scale reliably.
What is the main difference between continuous delivery and continuous deployment?
Continuous deployment avoids pipelines/CI-CD and needs manual copying to production.
Continuous deployment only prepares code for release but requires manual deployment.
Continuous delivery ignores automation and relies on manual testing for every release.
Continuous delivery automatically deploys all changes to production without checks.
Continuous delivery ensures changes are ready for release, but deployment is manual.
What is a key benefit of applying DevOps practices with automation and feature flags?
Teams must deploy all changes manually to ensure safety.
Automation eliminates the need for config/environment management.
Feature flags allow deployment without testing or control.
Automation forces all teams to use the same tools/schedule regardless of needs.
Teams can deploy smaller, more frequent changes, reducing risk and speeding up delivery.
What is the recommended approach to handle data storage to avoid multiple components introducing inconsistent rules and data?
Store all state in memory within the application tier.
Allow each service to access the database directly for flexibility.
Encapsulate the data store behind a dedicated service that implements validation and exposes a consistent API.
Avoid validation/business logic and rely on external scripts only.
Use multiple separate databases for each component to reduce dependency.
What is a key advantage of using WebSockets over long polling in web applications?
WebSockets automatically cache all server responses.
WebSockets guarantee message delivery even if the client loses connection.
WebSockets eliminate the need for API authentication.
WebSockets convert JSON responses into XML automatically.
WebSockets allow two-way communication without creating a new connection for each message.
What is the main reason developers need to understand the CSS box model when implementing UX designs?
To determine the database schema for storing design.
To ensure proper layout and spacing of elements on a webpage.
To optimize server-side rendering of web pages.
To manage API calls for dynamic content.
To convert JSON responses into XML for styling.
What is the main principle of the "mobile first" approach in web development?
Design for the least-capable devices first (typically mobile), then progressively enhance for larger or more capable devices.
Ignore network and device constraints during initial design.
Design for desktop devices first, then scale down for mobile.
Only optimize images for desktops, as mobile devices automatically scale them.
Create separate sites for mobile and desktop.
What is the purpose of progressive enhancement in front-end development?
To make the site load faster by only sending CSS and JavaScript to mobile users.
To replace server-side rendering with client-only rendering for all users.
To bundle third-party frameworks as the default way to serve content.
To ensure all users receive a basic experience, with additional features enabled via JavaScript when supported.
To automatically generate HTML from XML or HAML without developer input.
According to the text, what is the core idea behind the Agile Manifesto?
It values processes, documentation, contracts, and fixed plans.
It promotes separating business and technical teams to improve communication.
It rejects all forms of documentation and planning in software development.
It requires strict adherence to daily rituals like standups and retrospectives.
It values individuals and interactions, working software, customer collaboration, and responding to change more than rigid processes.
What is the main advantage of using SCSS over plain CSS?
SCSS allows browsers to ignore unsupported properties without errors.
SCSS allows variables, mixins, partials, and imports, enabling better reuse and organization of styles.
SCSS eliminates the need for CSS selectors entirely.
SCSS automatically converts HTML into CSS.
SCSS enforces that all CSS rules must be written in a single file.
What is the main advantage of using the double-diamond model during requirements gathering?
It helps teams explore problems broadly and then refine focused solutions without falling into design-by-committee.
It allows stakeholders to directly decide what should be built without developer input.
It ensures that only visual designers define the technical aspects of a project.
It replaces the need for workshops and stakeholder collaboration.
It focuses only on quantitative research methods and data analysis.
According to the text, what is the primary purpose of the backlog in Scrum?
It is a tool for estimating project budgets and timelines.
It is a schedule that defines the daily tasks of each developer.
It is a prioritized list of things to work on that guides the team's work during sprints.
It is a document used only to record completed features after each sprint.
It is a repository for tracking defects and performance issues.
Why is tree transformation often preferred for dynamic rich content instead of storing HTML directly in a database?
It converts HTML into JSON for faster rendering in the browser.
It forces all content to be written in HTML, which ensures consistency across all pages.
It automatically generates CSS and JavaScript for each content element without extra work.
It stores HTML in a database to maintain all CDN URLs and CSS class names for easy migration.
In a React+Redux application, what role does the Redux store typically serve?
It acts as the model, holding the application state and providing a single source of truth.
It only stores temporary UI state for drag-and-drop interactions.
It serves as the view, rendering components on the screen.
It replaces the controller by handling all user interactions directly.
It functions as a helper class for building models and validating data.
What is the main purpose of Behavior-Driven Development (BDD) in software projects?
To let developers independently define both requirements and tests without stakeholder input.
To remove the need for automated tests by relying solely on manual QA.
To ensure that every requirement is documented in a large Word functional requirements document.
To create a shared understanding between the development team and business/UX stakeholders using executable or traceable specifications.
To replace Test-Driven Development entirely with natural language tests.
What is the primary purpose of integration testing in software development?
To ensure that a group of modules interact together as expected using real instances of their dependencies.
To run faster than unit tests by skipping communication with databases or external resources.
To replace unit tests entirely with end-to-end tests.
To only test pre-canned responses from mocks without using real dependencies.
To test every possible configuration of inputs and outputs exhaustively.
What is the main purpose of using grids and patterns in UX design implementation?
To create analytics dashboards to track user behavior on each page.
To ensure consistent alignment and spacing across UI elements.
To replace wireframes entirely in the design process.
To test user interactions with prototypes.
To enhance the visual appeal of the design without functional considerations.
What is a key advantage of a microservice architecture compared to a monolithic architecture?
Each microservice can be deployed and scaled independently, promoting flexibility and adaptability.
Microservices are easier to build initially than monolithic systems.
A microservice combines all system functions into a single codebase.
Scaling a microservice requires duplicating the entire system on multiple machines.
What is the main purpose of using Planning Poker in Agile estimation?
To prioritize backlog items according to stakeholder requests.
To assign tasks automatically based on predefined estimates.
To replace daily stand-ups and sprint reviews.
To ensure all team members contribute to story point estimation and reach a consensus through discussion.
When designing a system architecture, how should implementation tools and technologies be chosen?
Only the newest or most popular technologies should be used, regardless of the team's experience.
Tools and frameworks should be selected based on the desired characteristics of components, considering the team's familiarity and organizational context.
Technologies should be changed frequently to follow industry trends.
All tools must be proprietary and vendor-specific to ensure consistency.
